summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 05751f3)
raw | patch | inline | side by side (from parent 1: 05751f3)
author | Robert Tivy <rtivy@ti.com> | |
Sat, 27 Jun 2015 00:29:48 +0000 (17:29 -0700) | ||
committer | Robert Tivy <rtivy@ti.com> | |
Tue, 30 Jun 2015 01:02:39 +0000 (18:02 -0700) |
A few "assert" expressions were using
<var> % SharedRegion_getCacheLineSize(obj->regionId)
which will generate a "modulo-by-0" error if
SharedRegion_getCacheLineSize(obj->regionId)
evaluates to (returns) 0.
Fix this by prefacing that expresssion with
SharedRegion_getCacheLineSize(obj->regionId) == 0 || <expr>
Addresses SDOCM00117013
<var> % SharedRegion_getCacheLineSize(obj->regionId)
which will generate a "modulo-by-0" error if
SharedRegion_getCacheLineSize(obj->regionId)
evaluates to (returns) 0.
Fix this by prefacing that expresssion with
SharedRegion_getCacheLineSize(obj->regionId) == 0 || <expr>
Addresses SDOCM00117013
packages/ti/sdo/ipc/nsremote/NameServerRemoteNotify.c | patch | blob | history | |
packages/ti/sdo/ipc/transports/TransportShm.c | patch | blob | history |
diff --git a/packages/ti/sdo/ipc/nsremote/NameServerRemoteNotify.c b/packages/ti/sdo/ipc/nsremote/NameServerRemoteNotify.c
index 7cb60be807d1114a6a7006d421533442a979414a..5abac2cfa0418e8a9fc429da74e01880b0677e60 100644 (file)
obj->remoteState = NameServerRemoteNotify_IDLE;
/* assert that sharedAddr is cache aligned */
- Assert_isTrue(((UInt32)params->sharedAddr %
+ Assert_isTrue(SharedRegion_getCacheLineSize(obj->regionId) == 0 ||
+ ((UInt32)params->sharedAddr %
SharedRegion_getCacheLineSize(obj->regionId) == 0),
Ipc_A_addrNotCacheAligned);
/* asset message structure size is cache aligned */
- Assert_isTrue((sizeof(NameServerRemoteNotify_Message) %
+ Assert_isTrue(SharedRegion_getCacheLineSize(obj->regionId) == 0 ||
+ (sizeof(NameServerRemoteNotify_Message) %
SharedRegion_getCacheLineSize(obj->regionId)) == 0,
NameServerRemoteNotify_A_messageSize);
diff --git a/packages/ti/sdo/ipc/transports/TransportShm.c b/packages/ti/sdo/ipc/transports/TransportShm.c
index 75d3ad41dc5c4b63d6284ef10cc01eede1871f46..b3475f915a0233246f95bbdcd3d0790e75845384 100644 (file)
ti_sdo_ipc_Ipc_A_addrNotInSharedRegion);
/* Assert that sharedAddr is cache aligned */
- Assert_isTrue(((UInt32)params->sharedAddr %
+ Assert_isTrue(SharedRegion_getCacheLineSize(obj->regionId) == 0 ||
+ ((UInt32)params->sharedAddr %
SharedRegion_getCacheLineSize(obj->regionId) == 0),
ti_sdo_ipc_Ipc_A_addrNotCacheAligned);