summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-12-28 11:14:10 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2015-12-28 11:14:10 -0500
commit036263e28057ae39f5fd1df0cbd87094770add80 (patch)
tree48ae58277f60f50a523b17ff8de5edeb9c7fadf6 /src
parentd765dbf22cb3242c055b19b797b0f4cb39a43aae (diff)
downloadgem5-036263e28057ae39f5fd1df0cbd87094770add80.tar.xz
mem: Fix cache sender state handling and add clarification
This patch addresses a bug in how the cache attached the MSHR as a sender state. Rather than overwriting any existing sender state it now pushes a new one. The handling of upward snoops is also clarified.
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/cache.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index 67e889453..187ed4801 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -2330,6 +2330,10 @@ Cache::getTimingPacket()
// dirty one.
Packet snoop_pkt(tgt_pkt, true, false);
snoop_pkt.setExpressSnoop();
+ // We are sending this packet upwards, but if it hits we will
+ // get a snoop response that we end up treating just like a
+ // normal response, hence it needs the MSHR as its sender
+ // state
snoop_pkt.senderState = mshr;
cpuSidePort->sendTimingSnoopReq(&snoop_pkt);
@@ -2399,7 +2403,9 @@ Cache::getTimingPacket()
}
assert(pkt != NULL);
- pkt->senderState = mshr;
+ // play it safe and append (rather than set) the sender state, as
+ // forwarded packets may already have existing state
+ pkt->pushSenderState(mshr);
return pkt;
}