projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9696881
)
Fix subtle cache bug where read could return stale data
author
Steve Reinhardt
<stever@gmail.com>
Sat, 15 Mar 2008 12:03:55 +0000
(
05:03
-0700)
committer
Steve Reinhardt
<stever@gmail.com>
Sat, 15 Mar 2008 12:03:55 +0000
(
05:03
-0700)
if a prior write miss arrived while an even earlier
read miss was still outstanding.
--HG--
extra : convert_revision :
4924e145829b2ecf4610b88d33f4773510c6801a
src/mem/cache/cache_impl.hh
patch
|
blob
|
history
diff --git
a/src/mem/cache/cache_impl.hh
b/src/mem/cache/cache_impl.hh
index e546e2a9ae13ac6d81fc6568013efcd49397267e..5aecea7d58eab4b520e257a93b574c85b753c78f 100644
(file)
--- a/
src/mem/cache/cache_impl.hh
+++ b/
src/mem/cache/cache_impl.hh
@@
-825,6
+825,10
@@
Cache<TagStore>::handleResponse(PacketPtr pkt)
}
if (mshr->promoteDeferredTargets()) {
+ assert(mshr->needsExclusive() && !blk->isWritable());
+ // avoid later read getting stale data while write miss is
+ // outstanding.. see comment in timingAccess()
+ blk->status &= ~BlkReadable;
MSHRQueue *mq = mshr->queue;
mq->markPending(mshr);
requestMemSideBus((RequestCause)mq->index, pkt->finishTime);