41 #ifndef __ARCH_MIPS_LOCKED_MEM_HH__
42 #define __ARCH_MIPS_LOCKED_MEM_HH__
54 #include "debug/LLSC.hh"
73 if (locked_addr == snoop_addr)
84 DPRINTF(LLSC,
"[cid:%i]: Load-Link Flag Set & Load-Link"
85 " Address set to %x.\n",
86 req->contextId(), req->getPaddr() & ~0xf);
99 if (req->isUncacheable()) {
102 req->setExtraData(2);
108 if (!lock_flag || (req->getPaddr() & ~0xf) != lock_addr) {
111 req->setExtraData(0);
118 int stCondFailures = xc->readStCondFailures();
120 xc->setStCondFailures(stCondFailures);
121 if (stCondFailures % 100000 == 0) {
122 warn(
"%i: context %d: %d consecutive "
123 "store conditional failures\n",
124 curTick(), xc->contextId(), stCondFailures);
128 DPRINTF(LLSC,
"[cid:%i]: Lock Flag Set, "
129 "Store Conditional Failed.\n",
131 }
else if ((req->getPaddr() & ~0xf) != lock_addr) {
132 DPRINTF(LLSC,
"[cid:%i]: Load-Link Address Mismatch, "
133 "Store Conditional Failed.\n",
148 xc->getCpuPtr()->wakeup(xc->threadId());