From 46f9f11a5575a0ec8a69a1c0181b37668de65152 Mon Sep 17 00:00:00 2001 From: Curtis Dunham Date: Wed, 29 Oct 2014 23:18:24 -0500 Subject: mem: have WriteInvalidate obsolete MSHRs Since WriteInvalidate directly writes into the cache, it can create tricky timing interleavings with reads and writes to the same cache line that haven't yet completed. This patch ensures that these requests, when completed, don't overwrite the newer data from the WriteInvalidate. --- src/mem/cache/mshr.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mem/cache/mshr.cc') diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc index 79a91da2b..fcf9fc425 100644 --- a/src/mem/cache/mshr.cc +++ b/src/mem/cache/mshr.cc @@ -62,8 +62,8 @@ using namespace std; MSHR::MSHR() : readyTime(0), _isUncacheable(false), downstreamPending(false), - pendingDirty(false), postInvalidate(false), - postDowngrade(false), queue(NULL), order(0), addr(0), size(0), + pendingDirty(false), postInvalidate(false), postDowngrade(false), + _isObsolete(false), queue(NULL), order(0), addr(0), size(0), isSecure(false), inService(false), isForward(false), threadNum(InvalidThreadID), data(NULL) { @@ -214,6 +214,7 @@ MSHR::allocate(Addr _addr, int _size, PacketPtr target, Tick whenReady, _isUncacheable = target->req->isUncacheable(); inService = false; downstreamPending = false; + _isObsolete = false; threadNum = 0; assert(targets.isReset()); // Don't know of a case where we would allocate a new MSHR for a -- cgit v1.2.3