From cabd4768c7186911fda91b9ea458df775b79486a Mon Sep 17 00:00:00 2001 From: Krishnendra Nathella Date: Sun, 19 Jul 2015 15:03:30 -0500 Subject: cpu: Fix LLSC atomic CPU wakeup Writes to locked memory addresses (LLSC) did not wake up the locking CPU. This can lead to deadlocks on multi-core runs. In AtomicSimpleCPU, recvAtomicSnoop was checking if the incoming packet was an invalidation (isInvalidate) and only then handled a locked snoop. But, writes are seen instead of invalidates when running without caches (fast-forward configurations). As as simple fix, now handleLockedSnoop is also called even if the incoming snoop packet are from writes. --- src/cpu/minor/lsq.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cpu/minor') diff --git a/src/cpu/minor/lsq.cc b/src/cpu/minor/lsq.cc index e644951f8..e0c5796c8 100644 --- a/src/cpu/minor/lsq.cc +++ b/src/cpu/minor/lsq.cc @@ -1617,7 +1617,9 @@ LSQ::recvTimingSnoopReq(PacketPtr pkt) * this action on snoops. */ /* THREAD */ - TheISA::handleLockedSnoop(cpu.getContext(0), pkt, cacheBlockMask); + if (pkt->isInvalidate() || pkt->isWrite()) { + TheISA::handleLockedSnoop(cpu.getContext(0), pkt, cacheBlockMask); + } } } -- cgit v1.2.3