diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-05-05 03:22:29 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-05-05 03:22:29 -0400 |
commit | 36f29496a019af4483430f17c4a6028b8dcfb2cf (patch) | |
tree | 28da4a1a1f29340fa7c95896427bf9c15da582d0 /src/mem/coherent_xbar.cc | |
parent | 554ddc7c074b0d9793a6c4972e1c449a57b94590 (diff) | |
download | gem5-36f29496a019af4483430f17c4a6028b8dcfb2cf.tar.xz |
mem: Snoop into caches on uncacheable accesses
This patch takes a last step in fixing issues related to uncacheable
accesses. We do not separate uncacheable memory from uncacheable
devices, and in cases where it is really memory, there are valid
scenarios where we need to snoop since we do not support cache
maintenance instructions (yet). On snooping an uncacheable access we
thus provide data if possible. In essence this makes uncacheable
accesses IO coherent.
The snoop filter is also queried to steer the snoops, but not updated
since the uncacheable accesses do not allocate a block.
Diffstat (limited to 'src/mem/coherent_xbar.cc')
-rw-r--r-- | src/mem/coherent_xbar.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc index d4188f0f2..cefad3161 100644 --- a/src/mem/coherent_xbar.cc +++ b/src/mem/coherent_xbar.cc @@ -180,8 +180,7 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) // determine how long to be crossbar layer is busy Tick packetFinishTime = clockEdge(Cycles(1)) + pkt->payloadDelay; - // uncacheable requests need never be snooped - if (!pkt->req->isUncacheable() && !system->bypassCaches()) { + if (!system->bypassCaches()) { // the packet is a memory-mapped request and should be // broadcasted to our snoopers but the source if (snoopFilter) { @@ -213,8 +212,7 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) // since it is a normal request, attempt to send the packet bool success = masterPorts[master_port_id]->sendTimingReq(pkt); - if (snoopFilter && !pkt->req->isUncacheable() - && !system->bypassCaches()) { + if (snoopFilter && !system->bypassCaches()) { // The packet may already be overwritten by the sendTimingReq function. // The snoop filter needs to see the original request *and* the return // status of the send operation, so we need to recreate the original @@ -323,7 +321,7 @@ CoherentXBar::recvTimingResp(PacketPtr pkt, PortID master_port_id) // determine how long to be crossbar layer is busy Tick packetFinishTime = clockEdge(Cycles(1)) + pkt->payloadDelay; - if (snoopFilter && !pkt->req->isUncacheable() && !system->bypassCaches()) { + if (snoopFilter && !system->bypassCaches()) { // let the snoop filter inspect the response and update its state snoopFilter->updateResponse(pkt, *slavePorts[slave_port_id]); } @@ -578,8 +576,7 @@ CoherentXBar::recvAtomic(PacketPtr pkt, PortID slave_port_id) MemCmd snoop_response_cmd = MemCmd::InvalidCmd; Tick snoop_response_latency = 0; - // uncacheable requests need never be snooped - if (!pkt->req->isUncacheable() && !system->bypassCaches()) { + if (!system->bypassCaches()) { // forward to all snoopers but the source std::pair<MemCmd, Tick> snoop_result; if (snoopFilter) { @@ -613,8 +610,7 @@ CoherentXBar::recvAtomic(PacketPtr pkt, PortID slave_port_id) Tick response_latency = masterPorts[master_port_id]->sendAtomic(pkt); // Lower levels have replied, tell the snoop filter - if (snoopFilter && !pkt->req->isUncacheable() && !system->bypassCaches() && - pkt->isResponse()) { + if (snoopFilter && !system->bypassCaches() && pkt->isResponse()) { snoopFilter->updateResponse(pkt, *slavePorts[slave_port_id]); } @@ -764,8 +760,7 @@ CoherentXBar::recvFunctional(PacketPtr pkt, PortID slave_port_id) pkt->cmdString()); } - // uncacheable requests need never be snooped - if (!pkt->req->isUncacheable() && !system->bypassCaches()) { + if (!system->bypassCaches()) { // forward to all snoopers but the source forwardFunctional(pkt, slave_port_id); } |