Fix subtle cache bug where read could return stale data
if a prior write miss arrived while an even earlier read miss was still outstanding. --HG-- extra : convert_revision : 4924e145829b2ecf4610b88d33f4773510c6801a
This commit is contained in:
4
src/mem/cache/cache_impl.hh
vendored
4
src/mem/cache/cache_impl.hh
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user