From 69d419f31383ac7801e1debb62d5bbf7cb899e3c Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 7 Jan 2013 13:05:33 -0500 Subject: o3: Fix issue with LLSC ordering and speculation This patch unlocks the cpu-local monitor when the CPU sees a snoop to a locked address. Previously we relied on the cache to handle the locking for us, however some users on the gem5 mailing list reported a case where the cpu speculatively executes a ll operation after a pending sc operation in the pipeline and that makes the cache monitor valid. This should handle that case by invaliding the local monitor. --- src/arch/x86/locked_mem.hh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/arch/x86') diff --git a/src/arch/x86/locked_mem.hh b/src/arch/x86/locked_mem.hh index 496486997..c2a8395aa 100644 --- a/src/arch/x86/locked_mem.hh +++ b/src/arch/x86/locked_mem.hh @@ -37,10 +37,17 @@ * ISA-specific helper functions for locked memory accesses. */ +#include "mem/packet.hh" #include "mem/request.hh" namespace X86ISA { + template + inline void + handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask) + { + } + template inline void handleLockedRead(XC *xc, Request *req) -- cgit v1.2.3