summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-05-08 05:15:52 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-05-08 05:15:52 -0400
commit692351ea34f15ba70b23fca68821dc2986de8238 (patch)
tree2ee23cb60f47dd0e19389346fa03016e05f82380 /src
parent15e28c5ba6ef0a436d05468e3113304987257b0b (diff)
downloadgem5-692351ea34f15ba70b23fca68821dc2986de8238.tar.xz
MEM: Do not forward uncacheable to bus snoopers
This patch adds a guarding if-statement to avoid forwarding uncacheable requests (or rather their corresponding request packets) to bus snoopers. These packets should never have any effect on the caches, and thus there is no need to forward them to the snoopers.
Diffstat (limited to 'src')
-rw-r--r--src/mem/bus.cc31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index 61b84d82e..58745326a 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -217,9 +217,12 @@ Bus::recvTimingReq(PacketPtr pkt)
Tick headerFinishTime = pkt->isExpressSnoop() ? 0 : calcPacketTiming(pkt);
Tick packetFinishTime = pkt->isExpressSnoop() ? 0 : pkt->finishTime;
- // the packet is a memory-mapped request and should be
- // broadcasted to our snoopers but the source
- forwardTiming(pkt, pkt->getSrc());
+ // uncacheable requests need never be snooped
+ if (!pkt->req->isUncacheable()) {
+ // the packet is a memory-mapped request and should be
+ // broadcasted to our snoopers but the source
+ forwardTiming(pkt, pkt->getSrc());
+ }
// remember if we add an outstanding req so we can undo it if
// necessary, if the packet needs a response, we should add it
@@ -543,10 +546,17 @@ Bus::recvAtomic(PacketPtr pkt)
slavePorts[pkt->getSrc()]->name(), pkt->getAddr(),
pkt->cmdString());
- // forward to all snoopers but the source
- std::pair<MemCmd, Tick> snoop_result = forwardAtomic(pkt, pkt->getSrc());
- MemCmd snoop_response_cmd = snoop_result.first;
- Tick snoop_response_latency = snoop_result.second;
+ MemCmd snoop_response_cmd = MemCmd::InvalidCmd;
+ Tick snoop_response_latency = 0;
+
+ // uncacheable requests need never be snooped
+ if (!pkt->req->isUncacheable()) {
+ // forward to all snoopers but the source
+ std::pair<MemCmd, Tick> snoop_result =
+ forwardAtomic(pkt, pkt->getSrc());
+ snoop_response_cmd = snoop_result.first;
+ snoop_response_latency = snoop_result.second;
+ }
// even if we had a snoop response, we must continue and also
// perform the actual request at the destination
@@ -643,8 +653,11 @@ Bus::recvFunctional(PacketPtr pkt)
pkt->cmdString());
}
- // forward to all snoopers but the source
- forwardFunctional(pkt, pkt->getSrc());
+ // uncacheable requests need never be snooped
+ if (!pkt->req->isUncacheable()) {
+ // forward to all snoopers but the source
+ forwardFunctional(pkt, pkt->getSrc());
+ }
// there is no need to continue if the snooping has found what we
// were looking for and the packet is already a response