mips: fix ll/sc pairs working incorrectly because of accidental clobber of LLFLAG
authorKorey Sewell <ksewell@umich.edu>
Fri, 31 Jul 2009 13:34:29 +0000 (09:34 -0400)
committerKorey Sewell <ksewell@umich.edu>
Fri, 31 Jul 2009 13:34:29 +0000 (09:34 -0400)
src/arch/mips/locked_mem.hh

index 2722ce8d259a4e270af07f33516742a2925144b1..8cf94df98adca61fbdd9daa4711bdd721d26a0a0 100644 (file)
@@ -51,7 +51,7 @@ inline void
 handleLockedRead(XC *xc, Request *req)
 {
     xc->setMiscRegNoEffect(MISCREG_LLADDR, req->getPaddr() & ~0xf);
-    xc->setMiscRegNoEffect(MISCREG_LLADDR, true);
+    xc->setMiscRegNoEffect(MISCREG_LLFLAG, true);
     DPRINTF(LLSC, "[tid:%i]: Load-Link Flag Set & Load-Link"
                   " Address set to %x.\n",
             req->threadId(), req->getPaddr() & ~0xf);
@@ -83,17 +83,12 @@ handleLockedWrite(XC *xc, Request *req)
             int stCondFailures = xc->readStCondFailures();
             stCondFailures++;
             xc->setStCondFailures(stCondFailures);
-            if (stCondFailures % 10 == 0) {
+            if (stCondFailures % 100000 == 0) {
                 warn("%i: context %d: %d consecutive "
                      "store conditional failures\n",
                      curTick, xc->contextId(), stCondFailures);
             }
 
-            if (stCondFailures == 5000) {
-                panic("Max (5000) Store Conditional Fails Reached. "
-                        "Check Code For Deadlock.\n");
-            }
-
             if (!lock_flag){
                 DPRINTF(LLSC, "[tid:%i]: Lock Flag Set, "
                               "Store Conditional Failed.\n",