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

Syslink IPC SharedRegion Fix

This fix removes the macros used as place holders for
memory module in shredregion ioctl functions.
The above mentioned macros are replacd with platform_mem
module functions
Signed-off-by: default avatarArun M G <arunmg@ti.com>
parent cf8d5c27
...@@ -23,16 +23,9 @@ ...@@ -23,16 +23,9 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <multiproc.h> #include <multiproc.h>
#include <sharedregion.h> #include <sharedregion.h>
#include <sharedregion_ioctl.h> #include <sharedregion_ioctl.h>
#include <platform_mem.h>
#define memory_translate(x, y) 0 /* To avoid comp error, remove when
memory module is ready */
#define Memory_XltFlags_Phys2Virt 0 /* To avoid comp error, remove when
memory module is ready */
#define memoryos_translate(x, y) 0
#define Memory_XltFlags_Virt2Phys 0
/* /*
* ======== sharedregion_ioctl_get_config ======== * ======== sharedregion_ioctl_get_config ========
...@@ -101,8 +94,8 @@ static int sharedregion_ioctl_setup(struct sharedregion_cmd_args *cargs) ...@@ -101,8 +94,8 @@ static int sharedregion_ioctl_setup(struct sharedregion_cmd_args *cargs)
if (info.is_valid == true) { if (info.is_valid == true) {
/* Convert kernel virtual address to physical /* Convert kernel virtual address to physical
* addresses */ * addresses */
info.base = memoryos_translate(info.base, info.base = platform_mem_translate(info.base,
Memory_XltFlags_Virt2Phys); PLATFORM_MEM_XLT_FLAGS_VIRT2PHYS);
size = copy_to_user((void *) (table size = copy_to_user((void *) (table
+ (j * config.max_regions) + (j * config.max_regions)
+ i), + i),
...@@ -140,8 +133,8 @@ static int sharedregion_ioctl_destroy( ...@@ -140,8 +133,8 @@ static int sharedregion_ioctl_destroy(
*/ */
static int sharedregion_ioctl_add(struct sharedregion_cmd_args *cargs) static int sharedregion_ioctl_add(struct sharedregion_cmd_args *cargs)
{ {
u32 base = (u32)memory_translate(cargs->args.add.base, u32 base = (u32)platform_mem_translate(cargs->args.add.base,
Memory_XltFlags_Phys2Virt); PLATFORM_MEM_XLT_FLAGS_PHYS2VIRT);
cargs->api_status = sharedregion_add(cargs->args.add.index, cargs->api_status = sharedregion_add(cargs->args.add.index,
(void *)base, cargs->args.add.len); (void *)base, cargs->args.add.len);
return 0; return 0;
......
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