From b8001a861b8398d9288807dbec7eef269a72954e Mon Sep 17 00:00:00 2001 From: Marleson Graf <9793033+hexengraf@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:30:37 -0300 Subject: [PATCH] mem-ruby,sim-se: Clear LL/SC locks after functional writes (#1404) Functional writes atomically update all copies of a data block, so they should invalidate any pending LL/SC locks, just like a conventional write would. Change-Id: Ic79d2d8d24901f1b6a2ce81dc0e2decc84c0ebbc --- src/mem/ruby/system/Sequencer.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index 4fef7090b6..bb21913879 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -269,6 +269,9 @@ Sequencer::functionalWrite(Packet *func_pkt) ++num_written; } } + // Functional writes to addresses being monitored + // will fail (remove) the monitor entry. + llscClearMonitor(makeLineAddress(func_pkt->getAddr())); return num_written; }