diff options
author | Steve Reinhardt <stever@gmail.com> | 2007-11-16 20:10:32 -0800 |
---|---|---|
committer | Steve Reinhardt <stever@gmail.com> | 2007-11-16 20:10:32 -0800 |
commit | f03a62008ac3508e5c8cad214e1df407236e75ec (patch) | |
tree | bb5c2ad21fa13294161bb8853cdbf1a6c627815f | |
parent | 5d23f86e98257099d760bb279b25f1c2c08f3825 (diff) | |
download | gem5-f03a62008ac3508e5c8cad214e1df407236e75ec.tar.xz |
Fix bug on exclusive response to ReadReq with pending WriteReq.
--HG--
extra : convert_revision : 5429cd7ca84cf6348813a4607fa16f76aa5df7e0
-rw-r--r-- | src/mem/cache/miss/mshr.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mem/cache/miss/mshr.cc b/src/mem/cache/miss/mshr.cc index 4e9b98481..e2ff444d5 100644 --- a/src/mem/cache/miss/mshr.cc +++ b/src/mem/cache/miss/mshr.cc @@ -330,6 +330,23 @@ MSHR::handleFill(Packet *pkt, CacheBlk *blk) // service... assert shared line on its behalf pkt->assertShared(); } + + if (!pkt->sharedAsserted() && !pendingInvalidate + && deferredTargets->needsExclusive) { + // We got an exclusive response, but we have deferred targets + // which are waiting to request an exclusive copy (not because + // of a pending invalidate). This can happen if the original + // request was for a read-only (non-exclusive) block, but we + // got an exclusive copy anyway because of the E part of the + // MOESI/MESI protocol. Since we got the exclusive copy + // there's no need to defer the targets, so move them up to + // the regular target list. + assert(!targets->needsExclusive); + targets->needsExclusive = true; + // this clears out deferredTargets too + targets->splice(targets->end(), *deferredTargets); + deferredTargets->resetFlags(); + } } |