O3: Fix unaligned stores when cache blocked
authorAli Saidi <Ali.Saidi@ARM.com>
Fri, 18 Mar 2011 00:20:19 +0000 (19:20 -0500)
committerAli Saidi <Ali.Saidi@ARM.com>
Fri, 18 Mar 2011 00:20:19 +0000 (19:20 -0500)
Without this change the a store can be issued to the cache multiple times.
If this case occurs when the l1 cache is out of mshrs (and thus blocked)
the processor will never make forward progress because each cycle it will
send a single request using the recently freed mshr and not completing the
multipart store. This will continue forever.

src/cpu/o3/lsq_unit_impl.hh

index b5d33793560ca6e9222200b3d04880311ae0eaa1..1a4e686a393c6d3f4ebe509414873f9dd91cd776 100644 (file)
@@ -1103,7 +1103,9 @@ LSQUnit<Impl>::recvRetry()
                 dynamic_cast<LSQSenderState *>(retryPkt->senderState);
 
             // Don't finish the store unless this is the last packet.
-            if (!TheISA::HasUnalignedMemAcc || !state->pktToSend) {
+            if (!TheISA::HasUnalignedMemAcc || !state->pktToSend ||
+                    state->pendingPacket == retryPkt) {
+                state->pktToSend = false;
                 storePostSend(retryPkt);
             }
             retryPkt = NULL;