summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2010-09-09 14:40:19 -0400
committerSteve Reinhardt <steve.reinhardt@amd.com>2010-09-09 14:40:19 -0400
commit12497284949cb5418e6bc403723c034aee655666 (patch)
tree425830586f5c32fe2674a3eb998678ef633d2d6e /src/mem/cache/mshr.cc
parent6dc599ea9bae9cb56ca81094b37009f5a14ebdff (diff)
downloadgem5-12497284949cb5418e6bc403723c034aee655666.tar.xz
cache: fail SC when invalidated while waiting for bus
Corrects an oversight in cset f97b62be544f. The fix there only failed queued SCUpgradeReq packets that encountered an invalidation, which meant that the upgrade had to reach the L2 cache. To handle pending requests in the L1 we must similarly fail StoreCondReq packets too.
Diffstat (limited to 'src/mem/cache/mshr.cc')
-rw-r--r--src/mem/cache/mshr.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index bbddf2aee..54977346f 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -72,7 +72,10 @@ MSHR::TargetList::add(PacketPtr pkt, Tick readyTime,
needsExclusive = true;
}
- if (pkt->isUpgrade()) {
+ // StoreCondReq is effectively an upgrade if it's in an MSHR
+ // since it would have been failed already if we didn't have a
+ // read-only copy
+ if (pkt->isUpgrade() || pkt->cmd == MemCmd::StoreCondReq) {
hasUpgrade = true;
}
}
@@ -98,6 +101,9 @@ replaceUpgrade(PacketPtr pkt)
} else if (pkt->cmd == MemCmd::SCUpgradeReq) {
pkt->cmd = MemCmd::SCUpgradeFailReq;
DPRINTF(Cache, "Replacing SCUpgradeReq with SCUpgradeFailReq\n");
+ } else if (pkt->cmd == MemCmd::StoreCondReq) {
+ pkt->cmd = MemCmd::StoreCondFailReq;
+ DPRINTF(Cache, "Replacing StoreCondReq with StoreCondFailReq\n");
}
}