summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/cache_impl.hh2
-rw-r--r--src/mem/coherent_bus.cc3
-rw-r--r--src/mem/comm_monitor.cc3
-rw-r--r--src/mem/port.hh7
-rw-r--r--src/mem/ruby/system/RubyPort.cc3
5 files changed, 14 insertions, 4 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index af32346bb..cc68bbd3d 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -795,7 +795,7 @@ Cache<TagStore>::functionalAccess(PacketPtr pkt, bool fromCpuSide)
// continues towards the memory side
if (fromCpuSide) {
memSidePort->sendFunctional(pkt);
- } else if (forwardSnoops && cpuSidePort->getMasterPort().isSnooping()) {
+ } else if (forwardSnoops && cpuSidePort->isSnooping()) {
// if it came from the memory side, it must be a snoop request
// and we should only forward it if we are forwarding snoops
cpuSidePort->sendFunctionalSnoop(pkt);
diff --git a/src/mem/coherent_bus.cc b/src/mem/coherent_bus.cc
index b40e84762..ef8d68f00 100644
--- a/src/mem/coherent_bus.cc
+++ b/src/mem/coherent_bus.cc
@@ -92,7 +92,8 @@ CoherentBus::init()
// neighbouring master ports are snooping and add them as snoopers
for (SlavePortConstIter p = slavePorts.begin(); p != slavePorts.end();
++p) {
- if ((*p)->getMasterPort().isSnooping()) {
+ // check if the connected master port is snooping
+ if ((*p)->isSnooping()) {
DPRINTF(BusAddrRanges, "Adding snooping master %s\n",
(*p)->getMasterPort().name());
snoopPorts.push_back(*p);
diff --git a/src/mem/comm_monitor.cc b/src/mem/comm_monitor.cc
index 4255d58ad..d8d5806bb 100644
--- a/src/mem/comm_monitor.cc
+++ b/src/mem/comm_monitor.cc
@@ -328,7 +328,8 @@ CommMonitor::recvTimingSnoopResp(PacketPtr pkt)
bool
CommMonitor::isSnooping() const
{
- return slavePort.getMasterPort().isSnooping();
+ // check if the connected master port is snooping
+ return slavePort.isSnooping();
}
unsigned
diff --git a/src/mem/port.hh b/src/mem/port.hh
index b93d5d444..49b0e1846 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -356,6 +356,13 @@ class SlavePort : public Port
unsigned peerBlockSize() const;
/**
+ * Find out if the peer master port is snooping or not.
+ *
+ * @return true if the peer master port is snooping
+ */
+ bool isSnooping() const { return _masterPort->isSnooping(); }
+
+ /**
* Called by the owner to send a range change
*/
void sendRangeChange() const { _masterPort->recvRangeChange(); }
diff --git a/src/mem/ruby/system/RubyPort.cc b/src/mem/ruby/system/RubyPort.cc
index 3621cc9e3..285017a06 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -695,7 +695,8 @@ RubyPort::ruby_eviction_callback(const Address& address)
// should this really be using funcMasterId?
Request req(address.getAddress(), 0, 0, Request::funcMasterId);
for (CpuPortIter p = slave_ports.begin(); p != slave_ports.end(); ++p) {
- if ((*p)->getMasterPort().isSnooping()) {
+ // check if the connected master port is snooping
+ if ((*p)->isSnooping()) {
Packet *pkt = new Packet(&req, MemCmd::InvalidationReq);
// send as a snoop request
(*p)->sendTimingSnoopReq(pkt);