Commit ad518db2 authored by Arun Gopalakrishnan's avatar Arun Gopalakrishnan Committed by Hari Kanigeri

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: default avatarArun M G <arunmg@ti.com>
parent d5c5ad0a
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
#include <linux/fs.h> #include <linux/fs.h>
#define IPC_IOC_MAGIC 0xE0 #define IPC_IOC_MAGIC 0xE0
#define IPC_IOC_BASE 0 #define IPC_IOC_BASE 2
enum ipc_command_count { enum ipc_command_count {
MULTIPROC_CMD_NOS = 3, MULTIPROC_CMD_NOS = 4,
NAMESERVER_CMD_NOS = 13, NAMESERVER_CMD_NOS = 13,
HEAPBUF_CMD_NOS = 13, HEAPBUF_CMD_NOS = 13,
SHAREDREGION_CMD_NOS = 10, SHAREDREGION_CMD_NOS = 10,
......
...@@ -45,8 +45,14 @@ struct multiproc_module_object { ...@@ -45,8 +45,14 @@ struct multiproc_module_object {
atomic_t ref_count; /* Reference count */ 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 ======== * ======== multiproc_get_config ========
......
...@@ -122,19 +122,19 @@ int multiproc_ioctl(struct inode *inode, struct file *filp, ...@@ -122,19 +122,19 @@ int multiproc_ioctl(struct inode *inode, struct file *filp,
switch (cmd) { switch (cmd) {
case CMD_MULTIPROC_SETUP: case CMD_MULTIPROC_SETUP:
status = mproc_ioctl_setup(uarg); status = mproc_ioctl_setup(&cargs);
break; break;
case CMD_MULTIPROC_DESTROY: case CMD_MULTIPROC_DESTROY:
status = mproc_ioctl_destroy(uarg); status = mproc_ioctl_destroy(&cargs);
break; break;
case CMD_MULTIPROC_GETCONFIG: case CMD_MULTIPROC_GETCONFIG:
status = mproc_ioctl_get_config(uarg); status = mproc_ioctl_get_config(&cargs);
break; break;
case CMD_MULTIPROC_SETLOCALID: case CMD_MULTIPROC_SETLOCALID:
status = multiproc_ioctl_set_local_id(uarg); status = multiproc_ioctl_set_local_id(&cargs);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment