41 #ifndef __ARCH_MIPS_LOCKED_MEM_HH__
42 #define __ARCH_MIPS_LOCKED_MEM_HH__
50 #include "arch/registers.hh"
53 #include "debug/LLSC.hh"
69 if (locked_addr == snoop_addr)
80 DPRINTF(LLSC,
"[cid:%i]: Load-Link Flag Set & Load-Link"
81 " Address set to %x.\n",
82 req->contextId(), req->getPaddr() & ~0xf);
95 if (req->isUncacheable()) {
104 if (!lock_flag || (req->getPaddr() & ~0xf) != lock_addr) {
107 req->setExtraData(0);
114 int stCondFailures = xc->readStCondFailures();
116 xc->setStCondFailures(stCondFailures);
117 if (stCondFailures % 100000 == 0) {
118 warn(
"%i: context %d: %d consecutive "
119 "store conditional failures\n",
120 curTick(), xc->contextId(), stCondFailures);
124 DPRINTF(LLSC,
"[cid:%i]: Lock Flag Set, "
125 "Store Conditional Failed.\n",
127 }
else if ((req->getPaddr() & ~0xf) != lock_addr) {
128 DPRINTF(LLSC,
"[cid:%i]: Load-Link Address Mismatch, "
129 "Store Conditional Failed.\n",
144 xc->getCpuPtr()->wakeup(xc->threadId());