summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-01-22 05:01:30 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2015-01-22 05:01:30 -0500
commit15c64035ed093cefe61a9731436a7bac25a4b1db (patch)
tree864cf24b94d4010741ed73018f5ad5c0ba59a953
parent0c2ffd2daa5a38b69c2061b304d8998a29343cca (diff)
downloadgem5-15c64035ed093cefe61a9731436a7bac25a4b1db.tar.xz
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.
-rw-r--r--src/mem/cache/cache_impl.hh11
1 files 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<class TagStore>
@@ -407,6 +404,9 @@ Cache<TagStore>::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<TagStore>::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<TagStore>::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;