summaryrefslogtreecommitdiff
path: root/src/mem/coherent_xbar.cc
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2016-06-01 12:23:54 +0100
committerNikos Nikoleris <nikos.nikoleris@arm.com>2017-11-09 20:49:15 +0000
commit85ef9b0f74abce291234373954e1319d56403d39 (patch)
treeb5413662cacd3ae939bc844b13a15de662f42d1b /src/mem/coherent_xbar.cc
parent8d439221e77f505ddf1ce36ae7ca6fdb406e0dbc (diff)
downloadgem5-85ef9b0f74abce291234373954e1319d56403d39.tar.xz
mem: Align the snoop behavior in the XBar for atomic and timing
When the XBar receives a Writeback/WriteClean packet, it doesn't need to snoop the upstream caches. It only queries the snoop filter and sets the blockCached flag accordingly. This is in line with the recvTimingReq. Change-Id: I0ae22f21491d75a111019124bb95bac7b16d3cd3 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com> Reviewed-on: https://gem5-review.googlesource.com/5043 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/coherent_xbar.cc')
-rw-r--r--src/mem/coherent_xbar.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc
index 7c3a4e314..ef0620822 100644
--- a/src/mem/coherent_xbar.cc
+++ b/src/mem/coherent_xbar.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016 ARM Limited
+ * Copyright (c) 2011-2017 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -661,8 +661,18 @@ CoherentXBar::recvAtomic(PacketPtr pkt, PortID slave_port_id)
// between and change the filter state
snoopFilter->finishRequest(false, pkt->getAddr(), pkt->isSecure());
- snoop_result = forwardAtomic(pkt, slave_port_id, InvalidPortID,
- sf_res.first);
+ if (pkt->isEviction()) {
+ // for block-evicting packets, i.e. writebacks and
+ // clean evictions, there is no need to snoop up, as
+ // all we do is determine if the block is cached or
+ // not, instead just set it here based on the snoop
+ // filter result
+ if (!sf_res.first.empty())
+ pkt->setBlockCached();
+ } else {
+ snoop_result = forwardAtomic(pkt, slave_port_id, InvalidPortID,
+ sf_res.first);
+ }
} else {
snoop_result = forwardAtomic(pkt, slave_port_id);
}