diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-09-09 14:40:19 -0400 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-09-09 14:40:19 -0400 |
commit | 12497284949cb5418e6bc403723c034aee655666 (patch) | |
tree | 425830586f5c32fe2674a3eb998678ef633d2d6e /src/mem/cache/cache_impl.hh | |
parent | 6dc599ea9bae9cb56ca81094b37009f5a14ebdff (diff) | |
download | gem5-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/cache_impl.hh')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 3f3dc6877..4f4d720b6 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -900,9 +900,10 @@ Cache<TagStore>::handleResponse(PacketPtr pkt) assert(!target->pkt->req->isUncacheable()); missLatency[target->pkt->cmdToIndex()][0/*pkt->req->threadId()*/] += completion_time - target->recvTime; - } else if (target->pkt->cmd == MemCmd::StoreCondReq && - pkt->cmd == MemCmd::UpgradeFailResp) { + } else if (pkt->cmd == MemCmd::UpgradeFailResp) { // failed StoreCond upgrade + assert(target->pkt->cmd == MemCmd::StoreCondReq || + target->pkt->cmd == MemCmd::StoreCondFailReq); completion_time = tags->getHitLatency() + pkt->finishTime; target->pkt->req->setExtraData(0); } else { @@ -1443,10 +1444,11 @@ Cache<TagStore>::getTimingPacket() PacketPtr tgt_pkt = mshr->getTarget()->pkt; PacketPtr pkt = NULL; - if (tgt_pkt->cmd == MemCmd::SCUpgradeFailReq) { - // SCUpgradeReq saw invalidation while queued in MSHR, so now - // that we are getting around to processing it, just treat it - // as if we got a failure response + if (tgt_pkt->cmd == MemCmd::SCUpgradeFailReq || + tgt_pkt->cmd == MemCmd::StoreCondFailReq) { + // SCUpgradeReq or StoreCondReq saw invalidation while queued + // in MSHR, so now that we are getting around to processing + // it, just treat it as if we got a failure response pkt = new Packet(tgt_pkt); pkt->cmd = MemCmd::UpgradeFailResp; pkt->senderState = mshr; |