diff options
author | Suman Anna <s-anna@ti.com> | 2009-07-25 00:30:57 -0500 |
---|---|---|
committer | Suman Anna <s-anna@ti.com> | 2010-02-10 10:33:46 -0600 |
commit | 776a7c6c9a257b373a2a3003dc18bc20d743ed9c (patch) | |
tree | a6f4ce6945aad08b63b15a8f8e124aaa172f7486 /arch/arm/plat-omap/include/syslink/heapbuf_ioctl.h | |
parent | 5e6e0b2cae6edaa4e7d687ac9ad3501ae73c4d32 (diff) |
SYSLINK: ipc - fix heapbuf issues in open, create & delete
This patch fixes multiple issues found in the heapbuf
module code based on IPC50. The patch also includes a fix for
a minor compile warning in gatepeterson. This patch includes
the following changes.
1. heapbuf_ioctl.h - Matched the ioctl args for open
and create arguments. Also includes some minor
formatting style changes.
2. heapbuf_ioctl.c - Retrieved the correct shared
region address pointers and gate handle from
the user-side. Memory allocated for heapbuf name
in heapbuf_ioctl_create and heapbuf_ioctl_open
is adjusted as the length is already incremented
in the user-side.
3. heapbuf.c - gatepeterson gate is used properly
for the gate used in internal object. The memory
for the heapbuf object name is freed after it is
removed from the nameserver module. This fixed
the issue with heapbuf_delete failure. volatile
has been used using a macro to reduce the checkpatch
warnings.
Signed-off-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'arch/arm/plat-omap/include/syslink/heapbuf_ioctl.h')
-rwxr-xr-x | arch/arm/plat-omap/include/syslink/heapbuf_ioctl.h | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/arch/arm/plat-omap/include/syslink/heapbuf_ioctl.h b/arch/arm/plat-omap/include/syslink/heapbuf_ioctl.h index f402350a918b..80165dcfc436 100755 --- a/arch/arm/plat-omap/include/syslink/heapbuf_ioctl.h +++ b/arch/arm/plat-omap/include/syslink/heapbuf_ioctl.h @@ -47,81 +47,81 @@ enum CMD_HEAPBUF { * Command for heapbuf_get_config */ #define CMD_HEAPBUF_GETCONFIG _IOWR(IPC_IOC_MAGIC, HEAPBUF_GETCONFIG,\ - struct heapbuf_cmd_args) + struct heapbuf_cmd_args) /* * Command for heapbuf_setup */ -#define CMD_HEAPBUF_SETUP _IOWR(IPC_IOC_MAGIC, HEAPBUF_SETUP, \ - struct heapbuf_cmd_args) +#define CMD_HEAPBUF_SETUP _IOWR(IPC_IOC_MAGIC, HEAPBUF_SETUP, \ + struct heapbuf_cmd_args) /* * Command for heapbuf_destroy */ -#define CMD_HEAPBUF_DESTROY _IOWR(IPC_IOC_MAGIC, HEAPBUF_DESTROY, \ +#define CMD_HEAPBUF_DESTROY _IOWR(IPC_IOC_MAGIC, HEAPBUF_DESTROY, \ struct heapbuf_cmd_args) /* * Command for heapbuf_prams_init */ -#define CMD_HEAPBUF_PARAMS_INIT _IOWR(IPC_IOC_MAGIC, \ - HEAPBUF_PARAMS_INIT, \ +#define CMD_HEAPBUF_PARAMS_INIT _IOWR(IPC_IOC_MAGIC, \ + HEAPBUF_PARAMS_INIT, \ struct heapbuf_cmd_args) /* * Command for heapbuf_create */ -#define CMD_HEAPBUF_CREATE _IOWR(IPC_IOC_MAGIC, HEAPBUF_CREATE, \ +#define CMD_HEAPBUF_CREATE _IOWR(IPC_IOC_MAGIC, HEAPBUF_CREATE, \ struct heapbuf_cmd_args) /* * Command for heapbuf_delete */ -#define CMD_HEAPBUF_DELETE _IOWR(IPC_IOC_MAGIC, HEAPBUF_DELETE, \ +#define CMD_HEAPBUF_DELETE _IOWR(IPC_IOC_MAGIC, HEAPBUF_DELETE, \ struct heapbuf_cmd_args) /* * Command for heapbuf_open */ -#define CMD_HEAPBUF_OPEN _IOWR(IPC_IOC_MAGIC, HEAPBUF_OPEN, \ +#define CMD_HEAPBUF_OPEN _IOWR(IPC_IOC_MAGIC, HEAPBUF_OPEN, \ struct heapbuf_cmd_args) /* * Command for heapbuf_close */ -#define CMD_HEAPBUF_CLOSE _IOWR(IPC_IOC_MAGIC, HEAPBUF_CLOSE, \ +#define CMD_HEAPBUF_CLOSE _IOWR(IPC_IOC_MAGIC, HEAPBUF_CLOSE, \ struct heapbuf_cmd_args) /* * Command for heapbuf_alloc */ -#define CMD_HEAPBUF_ALLOC _IOWR(IPC_IOC_MAGIC, HEAPBUF_ALLOC, \ +#define CMD_HEAPBUF_ALLOC _IOWR(IPC_IOC_MAGIC, HEAPBUF_ALLOC, \ struct heapbuf_cmd_args) /* * Command for heapbuf_free */ -#define CMD_HEAPBUF_FREE _IOWR(IPC_IOC_MAGIC, HEAPBUF_FREE, \ +#define CMD_HEAPBUF_FREE _IOWR(IPC_IOC_MAGIC, HEAPBUF_FREE, \ struct heapbuf_cmd_args) /* * Command for heapbuf_shared_memreq */ -#define CMD_HEAPBUF_SHAREDMEMREQ _IOWR(IPC_IOC_MAGIC, \ - HEAPBUF_SHAREDMEMREQ, \ +#define CMD_HEAPBUF_SHAREDMEMREQ _IOWR(IPC_IOC_MAGIC, \ + HEAPBUF_SHAREDMEMREQ, \ struct heapbuf_cmd_args) /* * Command for heapbuf_get_stats */ -#define CMD_HEAPBUF_GETSTATS _IOWR(IPC_IOC_MAGIC, \ - HEAPBUF_GETSTATS, \ +#define CMD_HEAPBUF_GETSTATS _IOWR(IPC_IOC_MAGIC, \ + HEAPBUF_GETSTATS, \ struct heapbuf_cmd_args) /* * Command for heapbuf_get_extended_stats */ -#define CMD_HEAPBUF_GETEXTENDEDSTATS _IOWR(IPC_IOC_MAGIC, \ - HEAPBUF_GETEXTENDEDSTATS, \ +#define CMD_HEAPBUF_GETEXTENDEDSTATS _IOWR(IPC_IOC_MAGIC, \ + HEAPBUF_GETEXTENDEDSTATS, \ struct heapbuf_cmd_args) @@ -146,6 +146,9 @@ union heapbuf_arg { void *handle; struct heapbuf_params *params; u32 name_len; + u32 *shared_addr_srptr; + u32 *shared_buf_srptr; + void *knl_gate; } create; struct { @@ -156,6 +159,8 @@ union heapbuf_arg { void *handle; struct heapbuf_params *params; u32 name_len; + u32 *shared_addr_srptr; + void *knl_gate; } open; struct { @@ -208,4 +213,3 @@ int heapbuf_ioctl(struct inode *pinode, struct file *filp, unsigned int cmd, unsigned long args); #endif /* _HEAPBUF_IOCTL_ */ - |