Commit 1ac07abd authored by Arun Gopalakrishnan's avatar Arun Gopalakrishnan Committed by Hari Kanigeri

IPC_Fix_Nameserver_And_Multiproc This includes the fixes in nameserver and...

IPC_Fix_Nameserver_And_Multiproc This includes the fixes in nameserver and multiproc modules during testing.

The additional changes in ioctl file to make sysc with
the changes propossed by Suman (command changes, copy
commands at a common place etc)
Signed-off-by: default avatarArun M G <arunmg@ti.com>
parent b7703837
...@@ -44,16 +44,18 @@ enum CMD_NAMESERVER { ...@@ -44,16 +44,18 @@ enum CMD_NAMESERVER {
* IOCTL command IDs for nameserver * IOCTL command IDs for nameserver
* *
*/ */
/* /*
* Command for nameserver_setup * Command for nameserver_setup
*/ */
#define CMD_NAMESERVER_SETUP _IO(IPC_IOC_MAGIC, NAMESERVER_SETUP) #define CMD_NAMESERVER_SETUP _IOWR(IPC_IOC_MAGIC, NAMESERVER_SETUP, \
struct nameserver_cmd_args)
/* /*
* Command for nameserver_destroy * Command for nameserver_destroy
*/ */
#define CMD_NAMESERVER_DESTROY _IO(IPC_IOC_MAGIC, NAMESERVER_DESTROY) #define CMD_NAMESERVER_DESTROY _IOWR(IPC_IOC_MAGIC, \
NAMESERVER_DESTROY, \
struct nameserver_cmd_args)
/* /*
* Command for nameserver_params_init * Command for nameserver_params_init
...@@ -65,13 +67,15 @@ enum CMD_NAMESERVER { ...@@ -65,13 +67,15 @@ enum CMD_NAMESERVER {
/* /*
* Command for nameserver_create * Command for nameserver_create
*/ */
#define CMD_NAMESERVER_CREATE _IOWR(IPC_IOC_MAGIC, NAMESERVER_CREATE,\ #define CMD_NAMESERVER_CREATE _IOWR(IPC_IOC_MAGIC, \
NAMESERVER_CREATE, \
struct nameserver_cmd_args) struct nameserver_cmd_args)
/* /*
* Command for nameserver_delete * Command for nameserver_delete
*/ */
#define CMD_NAMESERVER_DELETE _IOWR(IPC_IOC_MAGIC, NAMESERVER_DELETE,\ #define CMD_NAMESERVER_DELETE _IOWR(IPC_IOC_MAGIC, \
NAMESERVER_DELETE, \
struct nameserver_cmd_args) struct nameserver_cmd_args)
/* /*
...@@ -108,13 +112,13 @@ enum CMD_NAMESERVER { ...@@ -108,13 +112,13 @@ enum CMD_NAMESERVER {
/* /*
* Command for nameserver_remove * Command for nameserver_remove
*/ */
#define CMD_NAMESERVER_REMOVE _IOW(IPC_IOC_MAGIC, NAMESERVER_REMOVE, \ #define CMD_NAMESERVER_REMOVE _IOWR(IPC_IOC_MAGIC, NAMESERVER_REMOVE,\
struct nameserver_cmd_args) struct nameserver_cmd_args)
/* /*
* Command for nameserver_remove_entry * Command for nameserver_remove_entry
*/ */
#define CMD_NAMESERVER_REMOVEENTRY _IOW(IPC_IOC_MAGIC, \ #define CMD_NAMESERVER_REMOVEENTRY _IOWR(IPC_IOC_MAGIC, \
NAMESERVER_REMOVEENTRY, \ NAMESERVER_REMOVEENTRY, \
struct nameserver_cmd_args) struct nameserver_cmd_args)
...@@ -212,7 +216,7 @@ enum CMD_NAMESERVER { ...@@ -212,7 +216,7 @@ enum CMD_NAMESERVER {
* Command arguments for nameserver * Command arguments for nameserver
*/ */
struct nameserver_cmd_args { struct nameserver_cmd_args {
union nameserver_arg cmd_arg; union nameserver_arg args;
s32 api_status; s32 api_status;
}; };
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/string.h> #include <linux/string.h>
#include <gt.h>
#include <multiproc.h> #include <multiproc.h>
#define MULTIPROC_MAXPROCESSORS 4
/* /*
* Local processor's id. It has to be set before any module init. * Local processor's id. It has to be set before any module init.
*/ */
...@@ -40,7 +40,7 @@ struct multiproc_module_object { ...@@ -40,7 +40,7 @@ struct multiproc_module_object {
/* TDO:Add these back to the StateObject and configure them during Driver /* TDO:Add these back to the StateObject and configure them during Driver
* bootup using a Module_Init function. * bootup using a Module_Init function.
*/ */
static char modena[32] = "Modena"; static char modena[32] = "MPU";
static char tesla[32] = "Tesla"; static char tesla[32] = "Tesla";
static char sysm3[32] = "SysM3"; static char sysm3[32] = "SysM3";
static char appm3[32] = "AppM3"; static char appm3[32] = "AppM3";
...@@ -61,9 +61,6 @@ bool multiproc_set_local_id(u16 proc_id) ...@@ -61,9 +61,6 @@ bool multiproc_set_local_id(u16 proc_id)
{ {
bool status = true; bool status = true;
gt_1trace(mulproc_mask, GT_ENTER,
"multiProc_set_local_id: id = %d\n", proc_id);
if (proc_id >= MULTIPROC_MAXPROCESSORS) if (proc_id >= MULTIPROC_MAXPROCESSORS)
status = false; status = false;
else else
...@@ -81,9 +78,6 @@ u16 multiproc_get_id(const char *proc_name) ...@@ -81,9 +78,6 @@ u16 multiproc_get_id(const char *proc_name)
s32 i; s32 i;
u16 proc_id = MULTIPROC_INVALIDID; u16 proc_id = MULTIPROC_INVALIDID;
gt_1trace(mulproc_mask, GT_ENTER,
"multiproc_get_id: proc_name = %%s\n", proc_name);
/* If the name is NULL, just return the local id */ /* If the name is NULL, just return the local id */
if (proc_name == NULL) { if (proc_name == NULL) {
proc_id = module->local_id; proc_id = module->local_id;
...@@ -107,10 +101,8 @@ u16 multiproc_get_id(const char *proc_name) ...@@ -107,10 +101,8 @@ u16 multiproc_get_id(const char *proc_name)
*/ */
char *multiproc_get_name(u16 proc_id) char *multiproc_get_name(u16 proc_id)
{ {
char *proc_name = 0; char *proc_name = NULL;
gt_1trace(mulproc_mask, GT_ENTER,
"multiproc_get_name: id = %d\n", proc_id);
if (proc_id >= MULTIPROC_MAXPROCESSORS) if (proc_id >= MULTIPROC_MAXPROCESSORS)
goto end; goto end;
......
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