summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5f3751f)
raw | patch | inline | side by side (parent: 5f3751f)
author | Sam Nelson <sam.nelson@ti.com> | |
Fri, 15 Dec 2017 18:36:40 +0000 (13:36 -0500) | ||
committer | Angela Stegmaier <angelabaker@ti.com> | |
Thu, 21 Dec 2017 18:59:25 +0000 (12:59 -0600) |
Before opening the shared region, make sure the cache is
invalidated. Even though the memory was not accessed before, because of
speculative execution the memory may be in the cache line already.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
invalidated. Even though the memory was not accessed before, because of
speculative execution the memory may be in the cache line already.
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
packages/ti/sdo/ipc/GateMP.c | patch | blob | history |
index fd7a91e0804531f3f9a0fa4ed9d43dc5522419dc..41739bba37507bad1c9392870edf018d7773535d 100644 (file)
if ((entry.ownerProcId != MultiProc_self()) &&
(entry.ownerProcId != MultiProc_INVALIDID)) {
+
+ /* Make sure to invalidate cache before using shared memory content */
+ if (entry.cacheEnable) {
+ Cache_inv(sharedAddr, ti_sdo_ipc_GateMP_getRegion0ReservedSize(),
+ Cache_Type_ALL, TRUE);
+ }
+
/* if not the owner of the SharedRegion */
ti_sdo_ipc_GateMP_openRegion0Reserved(sharedAddr);