Use ReadResp instead of LoadLockedResp for LoadLockedReq responses.
authorSteve Reinhardt <stever@gmail.com>
Tue, 15 Jul 2008 18:38:51 +0000 (14:38 -0400)
committerSteve Reinhardt <stever@gmail.com>
Tue, 15 Jul 2008 18:38:51 +0000 (14:38 -0400)
src/cpu/simple/timing.cc
src/mem/packet.cc
src/mem/packet.hh

index b86d4b2d7548c6dbd10e5e5ee8642507da4226c7..4451dfe818c80ab4d2a9715e2673344cac379851 100644 (file)
@@ -730,7 +730,9 @@ TimingSimpleCPU::completeDataAccess(PacketPtr pkt)
         traceData = NULL;
     }
 
-    if (pkt->isRead() && pkt->isLocked()) {
+    // the locked flag may be cleared on the response packet, so check
+    // pkt->req and not pkt to see if it was a load-locked
+    if (pkt->isRead() && pkt->req->isLocked()) {
         TheISA::handleLockedRead(thread, pkt->req);
     }
 
index f3bd06f36fb13a66836d810e58eb6fe191f9ef06..35fd44e5bba2a2d66e6ba6bceb21ffe07e96370b 100644 (file)
@@ -101,12 +101,10 @@ MemCmd::commandInfo[] =
     /* ReadExResp */
     { SET4(IsRead, NeedsExclusive, IsResponse, HasData),
             InvalidCmd, "ReadExResp" },
-    /* LoadLockedReq */
+    /* LoadLockedReq: note that we use plain ReadResp as response, so that
+     *                we can also use ReadRespWithInvalidate when needed */
     { SET4(IsRead, IsLocked, IsRequest, NeedsResponse),
-            LoadLockedResp, "LoadLockedReq" },
-    /* LoadLockedResp */
-    { SET4(IsRead, IsLocked, IsResponse, HasData),
-            InvalidCmd, "LoadLockedResp" },
+            ReadResp, "LoadLockedReq" },
     /* StoreCondReq */
     { SET6(IsWrite, NeedsExclusive, IsLocked,
            IsRequest, NeedsResponse, HasData),
index a278a394581a648ea8f510bdca795a5ee72e60d8..36aff5b42eabf4d58a7eb1ac68f862be17ba37d1 100644 (file)
@@ -81,7 +81,6 @@ class MemCmd
         ReadExReq,
         ReadExResp,
         LoadLockedReq,
-        LoadLockedResp,
         StoreCondReq,
         StoreCondResp,
         SwapReq,