# Node ID b7623f2fc6507e1d930179ef5bda6b7b56a14ab6 # Parent c2146e4e20cd30c35b7ff4f4cd15c953663cdc4d diff --git a/src/cpu/minor/lsq.cc b/src/cpu/minor/lsq.cc --- a/src/cpu/minor/lsq.cc +++ b/src/cpu/minor/lsq.cc @@ -1617,7 +1617,9 @@ * this action on snoops. */ /* THREAD */ - TheISA::handleLockedSnoop(cpu.getContext(0), pkt, cacheBlockMask); + if (pkt->isInvalidate() || pkt->isWrite()) { + TheISA::handleLockedSnoop(cpu.getContext(0), pkt, cacheBlockMask); + } } } diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -292,7 +292,10 @@ } // if snoop invalidates, release any associated locks - if (pkt->isInvalidate()) { + // When run without caches, Invalidation packets will not be received + // hence we must check if the incoming packets are writes and wakeup + // the processor accordingly + if (pkt->isInvalidate() || pkt->isWrite()) { DPRINTF(SimpleCPU, "received invalidation for addr:%#x\n", pkt->getAddr()); for (auto &t_info : cpu->threadInfo) { diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -876,8 +876,13 @@ } } - for (auto &t_info : cpu->threadInfo) { - TheISA::handleLockedSnoop(t_info->thread, pkt, cacheBlockMask); + // The CPUs need to be woken up only on an invalidation packet (when + // using caches) or on an incoming write packet (when not using caches) + // It is not necessary to wake up the processor on all incoming packets + if (pkt->isInvalidate() || pkt->isWrite()) { + for (auto &t_info : cpu->threadInfo) { + TheISA::handleLockedSnoop(t_info->thread, pkt, cacheBlockMask); + } } }