mem: Avoid unecessary checks when creating HardPFReq in cache
authorAndreas Hansson <andreas.hansson@arm.com>
Mon, 28 Dec 2015 16:14:15 +0000 (11:14 -0500)
committerAndreas Hansson <andreas.hansson@arm.com>
Mon, 28 Dec 2015 16:14:15 +0000 (11:14 -0500)
The checks made before sending out a HardPFReq were unecessarily
complex, and checked for cases that never occur. This patch
tidies it up.

src/mem/cache/cache.cc

index fb37f524b309874e9e89a446df4bb523fd9e5a87..489f198c0b07b71b1eafe4abd6173f6d9252441b 100644 (file)
@@ -2352,22 +2352,13 @@ Cache::getTimingPacket()
             DPRINTF(Cache, "Block present, prefetch squashed by cache.  "
                     "Deallocating mshr target %#x.\n",
                     mshr->blkAddr);
-
             // Deallocate the mshr target
-            if (!tgt_pkt->isWriteback()) {
-                if (mshr->queue->forceDeallocateTarget(mshr)) {
-                    // Clear block if this deallocation resulted freed an
-                    // mshr when all had previously been utilized
-                    clearBlocked((BlockedCause)(mshr->queue->index));
-                }
-                return NULL;
-            } else {
-                // If this is a Writeback, and the snoops indicate that the blk
-                // is cached above, set the BLOCK_CACHED flag in the Writeback
-                // packet, so that it does not reset the bits corresponding to
-                // this block in the snoop filter below.
-                tgt_pkt->setBlockCached();
+            if (mshr->queue->forceDeallocateTarget(mshr)) {
+                // Clear block if this deallocation resulted freed an
+                // mshr when all had previously been utilized
+                clearBlocked((BlockedCause)(mshr->queue->index));
             }
+            return NULL;
         }
     }