mem: Fix sender state bug and delay popping

This patch fixes a newly introduced bug where the sender state was
popped before checking that it should be. Amazingly all regressions
pass, but Linux fails to boot on the detailed CPU with caches enabled.
This commit is contained in:
Andreas Hansson 2013-02-19 12:57:47 -05:00
parent a86f67e706
commit da950caed2

View file

@ -366,7 +366,7 @@ Cache<TagStore>::recvTimingSnoopResp(PacketPtr pkt)
// must be cache-to-cache response from upper to lower level // must be cache-to-cache response from upper to lower level
ForwardResponseRecord *rec = ForwardResponseRecord *rec =
dynamic_cast<ForwardResponseRecord *>(pkt->popSenderState()); dynamic_cast<ForwardResponseRecord *>(pkt->senderState);
assert(!system->bypassCaches()); assert(!system->bypassCaches());
if (rec == NULL) { if (rec == NULL) {
@ -379,6 +379,7 @@ Cache<TagStore>::recvTimingSnoopResp(PacketPtr pkt)
return; return;
} }
pkt->popSenderState();
pkt->setDest(rec->prevSrc); pkt->setDest(rec->prevSrc);
delete rec; delete rec;
// @todo someone should pay for this // @todo someone should pay for this