QNX: rpmsg-rpc: Add MAP_SHARED to mmap64 Call
authorAngela Stegmaier <angelabaker@ti.com>
Thu, 19 Jan 2017 16:52:36 +0000 (10:52 -0600)
committerAngela Stegmaier <angelabaker@ti.com>
Fri, 20 Jan 2017 21:25:09 +0000 (15:25 -0600)
With newer QNX kernels, there are issues unless the MAP_SHARED/MAP_PRIVATE
flag is added to the mmap64 call alongside the MAP_PHYS parameter
in rpmsg-rpc.

This patch adds the MAP_SHARED flag to address the issues.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
qnx/src/ipc3x_dev/ti/syslink/rpmsg-rpc/rpmsg-rpc.c

index 7e9f982f2c19765dcaaf316f1b0c27bf9c94b7f1..e5c390ad9f8f04117cf401e404250b878085b263 100644 (file)
@@ -1701,7 +1701,7 @@ _rpmsg_rpc_translate(ProcMgr_Handle handle, char *data, pid_t pid, bool reverse)
                 /* map into my process space */
                 vptr[idx] = mmap64(NULL, function->params[idx].size,
                                    PROT_NOCACHE | PROT_READ | PROT_WRITE,
-                                   MAP_PHYS, NOFD, paddr[idx]);
+                                   MAP_PHYS | MAP_SHARED, NOFD, paddr[idx]);
                 if (vptr[idx] == MAP_FAILED) {
                     vptr[idx] = 0;
                     status = -ENOMEM;