diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2007-06-25 22:23:29 -0700 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2007-06-25 22:23:29 -0700 |
commit | f697e959a17646500bca7c12e6bb7b30e047f1bb (patch) | |
tree | 0bb3d25129ea15ef34779be866907574b88ace2a /src/mem/cache/cache_impl.hh | |
parent | 529f12a531c331e4bdcf595a3aaf65ee5ef6b72d (diff) | |
download | gem5-f697e959a17646500bca7c12e6bb7b30e047f1bb.tar.xz |
Couple minor bug fixes...
src/mem/cache/cache_impl.hh:
Handle grants with no packet.
src/mem/cache/miss/mshr.cc:
Fix MSHR snoop hit handling.
--HG--
extra : convert_revision : f365283afddaa07cb9e050b2981ad6a898c14451
Diffstat (limited to 'src/mem/cache/cache_impl.hh')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 7610b5a41..48efc5ca3 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -912,7 +912,6 @@ Cache<TagStore,Coherence>::snoopTiming(PacketPtr pkt) if (pkt->isInvalidate()) { // Invalidation trumps our writeback... discard here - assert(0); markInService(mshr); } return; @@ -1201,18 +1200,24 @@ Cache<TagStore,Coherence>::MemSidePort::sendPacket() } else { // check for non-response packets (requests & writebacks) PacketPtr pkt = myCache()->getTimingPacket(); - assert(pkt != NULL); - MSHR *mshr = dynamic_cast<MSHR*>(pkt->senderState); + if (pkt == NULL) { + // can happen if e.g. we attempt a writeback and fail, but + // before the retry, the writeback is eliminated because + // we snoop another cache's ReadEx. + waitingOnRetry = false; + } else { + MSHR *mshr = dynamic_cast<MSHR*>(pkt->senderState); - bool success = sendTiming(pkt); - DPRINTF(Cache, "Address %x was %s in sending the timing request\n", - pkt->getAddr(), success ? "successful" : "unsuccessful"); + bool success = sendTiming(pkt); + DPRINTF(Cache, "Address %x was %s in sending the timing request\n", + pkt->getAddr(), success ? "successful" : "unsuccessful"); - waitingOnRetry = !success; - if (waitingOnRetry) { - DPRINTF(CachePort, "now waiting on a retry\n"); - } else { - myCache()->markInService(mshr); + waitingOnRetry = !success; + if (waitingOnRetry) { + DPRINTF(CachePort, "now waiting on a retry\n"); + } else { + myCache()->markInService(mshr); + } } } |