TransportShm: Fix handling of address > 32 bits
authorSam Nelson <sam.nelson@ti.com>
Mon, 7 Oct 2019 19:52:11 +0000 (15:52 -0400)
committerSam Nelson <sam.nelson@ti.com>
Tue, 8 Oct 2019 19:51:05 +0000 (15:51 -0400)
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
packages/ti/sdo/ipc/transports/TransportShm.c

index 2800d1d4dde924887cd45a08a65cbae634d940bf..7c83e9d2bb833076b0255b26aa7646b97e422af6 100644 (file)
@@ -184,7 +184,7 @@ Int TransportShm_Instance_init(TransportShm_Object *obj,
 
         /* Assert that sharedAddr is cache aligned */
         Assert_isTrue(SharedRegion_getCacheLineSize(obj->regionId) == 0 ||
-                ((UInt32)params->sharedAddr %
+                ((UArg)params->sharedAddr %
                 SharedRegion_getCacheLineSize(obj->regionId) == 0),
                 ti_sdo_ipc_Ipc_A_addrNotCacheAligned);
 
@@ -205,17 +205,17 @@ Int TransportShm_Instance_init(TransportShm_Object *obj,
      *  If cache is enabled, these need to be on separate cache lines.
      *  This is done with minAlign and _Ipc_roundup function.
      */
-    obj->other = (TransportShm_Attrs *)((UInt32)(obj->self) +
+    obj->other = (TransportShm_Attrs *)((UArg)(obj->self) +
         (_Ipc_roundup(sizeof(TransportShm_Attrs), minAlign)));
 
     ListMP_Params_init(&(listMPParams[0]));
     listMPParams[0].gate = (GateMP_Handle)obj->gate;
-    listMPParams[0].sharedAddr = (UInt32 *)((UInt32)(obj->other) +
+    listMPParams[0].sharedAddr = (UInt32 *)((UArg)(obj->other) +
         (_Ipc_roundup(sizeof(TransportShm_Attrs), minAlign)));
 
     ListMP_Params_init(&listMPParams[1]);
     listMPParams[1].gate = (GateMP_Handle)obj->gate;
-    listMPParams[1].sharedAddr = (UInt32 *)((UInt32)(listMPParams[0].sharedAddr)
+    listMPParams[1].sharedAddr = (UInt32 *)((UArg)(listMPParams[0].sharedAddr)
         + ListMP_sharedMemReq(&listMPParams[0]));
 
     obj->priority      = params->priority;