summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04f0bf7)
raw | patch | inline | side by side (parent: 04f0bf7)
author | John Godbey <j-godbey@ti.com> | |
Wed, 27 Apr 2016 15:52:03 +0000 (11:52 -0400) | ||
committer | Angela Stegmaier <angelabaker@ti.com> | |
Wed, 27 Apr 2016 15:56:03 +0000 (10:56 -0500) |
Additional cache invalidates are needed to ensure all data remains fresh.
Signed-off-by: John Godbey <j-godbey@ti.com>
Signed-off-by: John Godbey <j-godbey@ti.com>
packages/ti/sdo/ipc/notifyDrivers/NotifyDriverCirc.c | patch | blob | history | |
packages/ti/sdo/ipc/transports/TransportShmNotify.c | patch | blob | history |
diff --git a/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverCirc.c b/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverCirc.c
index 980ce50db33b725177a3a736394b5ae3e9a6a8fc..26d1c42c79752950e4fa96fb40bdb2e25ff677ac 100644 (file)
obj->opCacheSize,
Cache_Type_ALL,
FALSE);
obj->opCacheSize,
Cache_Type_ALL,
FALSE);
+ /* Reading new data instead of pulling old data from cache */
+ Cache_inv(obj->getWriteIndex,
+ sizeof(obj->getWriteIndex),
+ Cache_Type_ALL,
+ FALSE);
}
/* Clear the remote interrupt */
}
/* Clear the remote interrupt */
diff --git a/packages/ti/sdo/ipc/transports/TransportShmNotify.c b/packages/ti/sdo/ipc/transports/TransportShmNotify.c
index 78b53eaee608c46c87ce8a79d37255c78bbed10a..95a16e6746c16f40426566c431d86a11e7b604e3 100644 (file)
{
UInt32 queueId;
MessageQ_Msg msg;
{
UInt32 queueId;
MessageQ_Msg msg;
+ UInt16 regionId;
msg = SharedRegion_getPtr((SharedRegion_SRPtr)payload);
msg = SharedRegion_getPtr((SharedRegion_SRPtr)payload);
+ /* Read new data into memory instead of old data from cache */
+ regionId = SharedRegion_getId(msg);
+ if (SharedRegion_isCacheEnabled(regionId)) {
+ /* invalidate header before reading header */
+ Cache_inv(msg,
+ sizeof(MessageQ_MsgHeader),
+ Cache_Type_ALL,
+ TRUE);
+ /* invalidate the rest of the message */
+ Cache_inv(((char *)msg) + sizeof(MessageQ_MsgHeader),
+ msg->msgSize - sizeof(MessageQ_MsgHeader),
+ Cache_Type_ALL,
+ TRUE);
+ }
+
queueId = MessageQ_getDstQueue(msg);
MessageQ_put(queueId, msg);
queueId = MessageQ_getDstQueue(msg);
MessageQ_put(queueId, msg);