diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-09-25 07:26:57 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-09-25 07:26:57 -0400 |
commit | 0c5a98f9d18c6fdae287b1b608d1ffb1c13fb9c9 (patch) | |
tree | 06b467633133c920bb1f8a20339dd815f831e8b2 /src/mem/coherent_xbar.cc | |
parent | ceec2bb02c87829f29aa1ebb4573051162264ae8 (diff) | |
download | gem5-0c5a98f9d18c6fdae287b1b608d1ffb1c13fb9c9.tar.xz |
mem: Store snoop filter lookup result to avoid second lookup
This patch introduces a private member storing the iterator from the
lookupRequest call, such that it can be re-used when the request
eventually finishes. The method previously called updateRequest is
renamed finishRequest to make it more clear that the two functions
must be called together.
Diffstat (limited to 'src/mem/coherent_xbar.cc')
-rw-r--r-- | src/mem/coherent_xbar.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc index 7181cb965..206f94406 100644 --- a/src/mem/coherent_xbar.cc +++ b/src/mem/coherent_xbar.cc @@ -235,7 +235,7 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) if (snoopFilter && !system->bypassCaches()) { // Let the snoop filter know about the success of the send operation - snoopFilter->updateRequest(pkt, *src_port, !success); + snoopFilter->finishRequest(!success, pkt); } // check if we were successful in sending the packet onwards @@ -610,7 +610,7 @@ CoherentXBar::recvAtomic(PacketPtr pkt, PortID slave_port_id) // operation, and do it even before sending it onwards to // avoid situations where atomic upward snoops sneak in // between and change the filter state - snoopFilter->updateRequest(pkt, *slavePorts[slave_port_id], false); + snoopFilter->finishRequest(false, pkt); snoop_result = forwardAtomic(pkt, slave_port_id, InvalidPortID, sf_res.first); |