From 15c64035ed093cefe61a9731436a7bac25a4b1db Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 22 Jan 2015 05:01:30 -0500 Subject: [PATCH] mem: Remove Packet source from ForwardResponseRecord This patch removes the source field from the ForwardResponseRecord, but keeps the class as it is part of how the cache identifies responses to hardware prefetches that are snooped upwards. --- src/mem/cache/cache_impl.hh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 62b65fc42..0dd158afe 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -385,10 +385,7 @@ class ForwardResponseRecord : public Packet::SenderState { public: - PortID prevSrc; - - ForwardResponseRecord(PortID prev_src) : prevSrc(prev_src) - {} + ForwardResponseRecord() {} }; template @@ -407,6 +404,9 @@ Cache::recvTimingSnoopResp(PacketPtr pkt) assert(!system->bypassCaches()); if (rec == NULL) { + // @todo What guarantee do we have that this HardPFResp is + // actually for this cache, and not a cache closer to the + // memory? assert(pkt->cmd == MemCmd::HardPFResp); // Check if it's a prefetch response and handle it. We shouldn't // get any other kinds of responses without FRRs. @@ -417,7 +417,6 @@ Cache::recvTimingSnoopResp(PacketPtr pkt) } pkt->popSenderState(); - pkt->setDest(rec->prevSrc); delete rec; // @todo someone should pay for this pkt->firstWordDelay = pkt->lastWordDelay = 0; @@ -1542,7 +1541,7 @@ Cache::handleSnoop(PacketPtr pkt, BlkType *blk, if (is_timing) { Packet snoopPkt(pkt, true, false); // clear flags, no allocation snoopPkt.setExpressSnoop(); - snoopPkt.pushSenderState(new ForwardResponseRecord(pkt->getSrc())); + snoopPkt.pushSenderState(new ForwardResponseRecord()); // the snoop packet does not need to wait any additional // time snoopPkt.firstWordDelay = snoopPkt.lastWordDelay = 0; -- 2.30.2