From 77073997922e2bb0bc361c0d80221193fb4d6087 Mon Sep 17 00:00:00 2001 From: Arun Gopalakrishnan <x0102225@linuxomap.(none)> Date: Thu, 23 Jul 2009 19:27:30 +0530 Subject: [PATCH] Syslink IPC MultiProc Fix This patch fixes the issues in multiproc 1. The ioctl command base is moved to 2 from 0, this applies to multiproc and all other ipc modules 2. Default configuration values were added to module state object 3. The multiproc functions that were called with wrong argument were fixed Signed-off-by: Arun M G <arunmg@ti.com> --- arch/arm/plat-omap/include/syslink/ipc_ioctl.h | 4 ++-- drivers/dsp/syslink/multicore_ipc/multiproc.c | 10 ++++++++-- drivers/dsp/syslink/multicore_ipc/multiproc_ioctl.c | 8 ++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/arch/arm/plat-omap/include/syslink/ipc_ioctl.h b/arch/arm/plat-omap/include/syslink/ipc_ioctl.h index d7bab2dee13..22d0a17493f 100755 --- a/arch/arm/plat-omap/include/syslink/ipc_ioctl.h +++ b/arch/arm/plat-omap/include/syslink/ipc_ioctl.h @@ -25,10 +25,10 @@ #include <linux/fs.h> #define IPC_IOC_MAGIC 0xE0 -#define IPC_IOC_BASE 0 +#define IPC_IOC_BASE 2 enum ipc_command_count { - MULTIPROC_CMD_NOS = 3, + MULTIPROC_CMD_NOS = 4, NAMESERVER_CMD_NOS = 13, HEAPBUF_CMD_NOS = 13, SHAREDREGION_CMD_NOS = 10, diff --git a/drivers/dsp/syslink/multicore_ipc/multiproc.c b/drivers/dsp/syslink/multicore_ipc/multiproc.c index a57402e8ded..7e7b7bd6b4c 100755 --- a/drivers/dsp/syslink/multicore_ipc/multiproc.c +++ b/drivers/dsp/syslink/multicore_ipc/multiproc.c @@ -45,8 +45,14 @@ struct multiproc_module_object { atomic_t ref_count; /* Reference count */ }; -static struct multiproc_module_object multiproc_state; - +static struct multiproc_module_object multiproc_state = { + .def_cfg.max_processors = 4, + .def_cfg.name_list[0][0] = "MPU", + .def_cfg.name_list[1][0] = "Tesla", + .def_cfg.name_list[2][0] = "SysM3", + .def_cfg.name_list[3][0] = "AppM3", + .def_cfg.id = 0 +}; /* * ======== multiproc_get_config ======== diff --git a/drivers/dsp/syslink/multicore_ipc/multiproc_ioctl.c b/drivers/dsp/syslink/multicore_ipc/multiproc_ioctl.c index 7d286f57d7c..3b60f479885 100755 --- a/drivers/dsp/syslink/multicore_ipc/multiproc_ioctl.c +++ b/drivers/dsp/syslink/multicore_ipc/multiproc_ioctl.c @@ -122,19 +122,19 @@ int multiproc_ioctl(struct inode *inode, struct file *filp, switch (cmd) { case CMD_MULTIPROC_SETUP: - status = mproc_ioctl_setup(uarg); + status = mproc_ioctl_setup(&cargs); break; case CMD_MULTIPROC_DESTROY: - status = mproc_ioctl_destroy(uarg); + status = mproc_ioctl_destroy(&cargs); break; case CMD_MULTIPROC_GETCONFIG: - status = mproc_ioctl_get_config(uarg); + status = mproc_ioctl_get_config(&cargs); break; case CMD_MULTIPROC_SETLOCALID: - status = multiproc_ioctl_set_local_id(uarg); + status = multiproc_ioctl_set_local_id(&cargs); break; default: -- 2.25.4