summaryrefslogtreecommitdiff
path: root/src/mem/cache/miss/mshr.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2007-07-23 22:28:40 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2007-07-23 22:28:40 -0700
commit1f9ea6e122f6a39d936aec2f8f5ce72d267799a8 (patch)
tree973cc374a80ae441a3ef6c7888342244a37d394f /src/mem/cache/miss/mshr.cc
parent97f7ee2e507733eb9dd1802c16900fd14ae6b7f3 (diff)
downloadgem5-1f9ea6e122f6a39d936aec2f8f5ce72d267799a8.tar.xz
A couple more minor bug fixes for multilevel coherence.
--HG-- extra : convert_revision : 370f9e34911157765be6fd49e826fa1af589b466
Diffstat (limited to 'src/mem/cache/miss/mshr.cc')
-rw-r--r--src/mem/cache/miss/mshr.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mem/cache/miss/mshr.cc b/src/mem/cache/miss/mshr.cc
index 9b05aea3f..7f216ad39 100644
--- a/src/mem/cache/miss/mshr.cc
+++ b/src/mem/cache/miss/mshr.cc
@@ -208,7 +208,7 @@ MSHR::allocateTarget(PacketPtr pkt, Tick whenReady, Counter _order)
bool
MSHR::handleSnoop(PacketPtr pkt, Counter _order)
{
- if (!inService || downstreamPending) {
+ if (!inService || (pkt->isExpressSnoop() && downstreamPending)) {
// Request has not been issued yet, or it's been issued
// locally but is buffered unissued at some downstream cache
// which is forwarding us this snoop. Either way, the packet
@@ -249,13 +249,19 @@ MSHR::handleSnoop(PacketPtr pkt, Counter _order)
if (targets->needsExclusive || pkt->needsExclusive()) {
// actual target device (typ. PhysicalMemory) will delete the
// packet on reception, so we need to save a copy here
- targets->add(new Packet(pkt), curTick, _order, false);
+ PacketPtr cp_pkt = new Packet(pkt);
+ targets->add(cp_pkt, curTick, _order, false);
++ntargets;
if (targets->needsExclusive) {
// We're awaiting an exclusive copy, so ownership is pending.
// It's up to us to respond once the data arrives.
pkt->assertMemInhibit();
+ } else {
+ // Someone else may respond before we get around to
+ // processing this snoop, which means the copied request
+ // pointer will no longer be valid
+ cp_pkt->req = NULL;
}
if (pkt->needsExclusive()) {