diff options
author | Ron Dreslinski <rdreslin@umich.edu> | 2006-10-17 15:05:21 -0400 |
---|---|---|
committer | Ron Dreslinski <rdreslin@umich.edu> | 2006-10-17 15:05:21 -0400 |
commit | 288b98eb695f7ee508df523e87431181ee878d66 (patch) | |
tree | adcfa90d913616479317090d489c3f580e10df61 /src/mem/cache/cache_impl.hh | |
parent | db6cc97e31c992edd53f2b519aae9e0634ffc8fc (diff) | |
download | gem5-288b98eb695f7ee508df523e87431181ee878d66.tar.xz |
Fix it so that the cache does not assume to gave the packet it sent out via sendTiming.
Still need to fix upgrades to use this path
src/mem/cache/base_cache.cc:
Copy the pkt to the MSHR before issuing the sendTiming where it may be changed/consumed
src/mem/cache/cache_impl.hh:
Use copy of packet, because sendTiming may have changed the pkt
Also, delete the copy when the time comes
--HG--
extra : convert_revision : 635cde6b4f08d010affde310c46b1caf50fbe424
Diffstat (limited to 'src/mem/cache/cache_impl.hh')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 00f93328e..fc559195d 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -273,9 +273,9 @@ void Cache<TagStore,Buffering,Coherence>::sendResult(PacketPtr &pkt, MSHR* mshr, bool success) { if (success && !(pkt->flags & NACKED_LINE)) { - missQueue->markInService(pkt, mshr); + missQueue->markInService(mshr->pkt, mshr); //Temp Hack for UPGRADES - if (pkt->cmd == Packet::UpgradeReq) { + if (mshr->pkt->cmd == Packet::UpgradeReq) { pkt->flags &= ~CACHE_LINE_FILL; BlkType *blk = tags->findBlock(pkt); CacheBlk::State old_state = (blk) ? blk->status : 0; @@ -304,6 +304,8 @@ Cache<TagStore,Buffering,Coherence>::handleResponse(Packet * &pkt) { BlkType *blk = NULL; if (pkt->senderState) { + //Delete temp copy in MSHR, restore it. + delete ((MSHR*)pkt->senderState)->pkt; ((MSHR*)pkt->senderState)->pkt = pkt; if (pkt->result == Packet::Nacked) { //pkt->reinitFromRequest(); |