author | Robert Tivy <rtivy@ti.com> | |
Fri, 19 Jun 2015 18:11:05 +0000 (11:11 -0700) | ||
committer | Robert Tivy <rtivy@ti.com> | |
Fri, 19 Jun 2015 18:11:05 +0000 (11:11 -0700) |
1 | 2 | |||
---|---|---|---|---|
packages/ti/sdo/ipc/GateMP.c | patch | | diff1 | | diff2 | | blob | history |
diff --combined packages/ti/sdo/ipc/GateMP.c
index 98160af6aecd19e2a208c95f2f37cfc1fe4fb605,ba60477bef570b2582359c1738039a0beedb8c49..98ec273cd179716e157227c847fdedf15fc56ac6
ret = _GateMP_virtToPhys(
(UInt32)GateMP_module->remoteSystemInUse, &nsValue[0]);
Assert_isTrue(ret == GateMP_S_SUCCESS, (Assert_Id)NULL);
+ (void)ret; /* silence unused var warning when asserts disabled */
ret = _GateMP_virtToPhys(
(UInt32)GateMP_module->remoteCustom1InUse, &nsValue[1]);
Assert_isTrue(ret == GateMP_S_SUCCESS, (Assert_Id)NULL);
ti_sdo_ipc_GateMP_Handle *remoteHandles;
UInt8 *inUseArray;
- UInt numResources;
+ UInt size;
/* Cannot call when numOpen is non-zero. */
Assert_isTrue(obj->numOpens == 0, ti_sdo_ipc_GateMP_A_invalidDelete);
inUseArray = GateMP_module->remoteSystemInUse;
remoteHandles = GateMP_module->remoteSystemGates;
- numResources = GateMP_module->numRemoteSystem;
+ size = GateMP_module->numRemoteSystem * sizeof(UInt8);
break;
case GateMP_RemoteProtect_CUSTOM1:
inUseArray = GateMP_module->remoteCustom1InUse;
remoteHandles = GateMP_module->remoteCustom1Gates;
- numResources = GateMP_module->numRemoteCustom1;
+ size = GateMP_module->numRemoteCustom1 * sizeof(UInt8);
break;
case GateMP_RemoteProtect_CUSTOM2:
inUseArray = GateMP_module->remoteCustom2InUse;
remoteHandles = GateMP_module->remoteCustom2Gates;
- numResources = GateMP_module->numRemoteCustom2;
+ size = GateMP_module->numRemoteCustom2 * sizeof(UInt8);
break;
case GateMP_RemoteProtect_NONE:
/*
systemKey = Hwi_disable();
}
+ #ifdef xdc_target__isaCompatible_v7A
+ /* ARM speculative execution might have pulled array into cache */
+ if (obj->cacheEnabled) {
+ Cache_inv(inUseArray, size, Cache_Type_ALL, TRUE);
+ }
+ #endif
/* update the GateMP resource tracker */
inUseArray[obj->resourceId] = UNUSED;
if (obj->cacheEnabled) {
- Cache_wbInv(inUseArray,
- numResources * sizeof(UInt8),
- Cache_Type_ALL,
- TRUE);
+ Cache_wbInv(inUseArray, size, Cache_Type_ALL, TRUE);
}
if (GateMP_module->defaultGate != NULL) {