mem-cache: Remove blk_addr from Queue::trySatisfyFunctional
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Mon, 11 Feb 2019 14:41:34 +0000 (15:41 +0100)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Fri, 19 Apr 2019 16:34:00 +0000 (16:34 +0000)
The blk_addr is pkt->getBlockAddr(), and therefore can be
acquired internally, when needed, as long as the pkt is
provided.

Change-Id: I2780445d2a0cb9e27257961efc4f438cc19550e5
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17537
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

src/mem/cache/base.cc
src/mem/cache/queue.hh

index 2a6bc2a5697933406365535e3c89a1e8ebcf8cb7..70e7ba1869125f717b956884db817299f905ef5c 100644 (file)
@@ -649,8 +649,8 @@ BaseCache::functionalAccess(PacketPtr pkt, bool from_cpu_side)
 
     bool done = have_dirty ||
         cpuSidePort.trySatisfyFunctional(pkt) ||
-        mshrQueue.trySatisfyFunctional(pkt, blk_addr) ||
-        writeBuffer.trySatisfyFunctional(pkt, blk_addr) ||
+        mshrQueue.trySatisfyFunctional(pkt) ||
+        writeBuffer.trySatisfyFunctional(pkt) ||
         memSidePort.trySatisfyFunctional(pkt);
 
     DPRINTF(CacheVerbose, "%s: %s %s%s%s\n", __func__,  pkt->print(),
index 30fe4bad6a8f2710559f829d1e900d511c16767a..c75894a763888f303fd5d946185dc6afbe1ced13 100644 (file)
@@ -181,11 +181,11 @@ class Queue : public Drainable
         return nullptr;
     }
 
-    bool trySatisfyFunctional(PacketPtr pkt, Addr blk_addr)
+    bool trySatisfyFunctional(PacketPtr pkt)
     {
         pkt->pushLabel(label);
         for (const auto& entry : allocatedList) {
-            if (entry->matchBlockAddr(blk_addr, pkt->isSecure()) &&
+            if (entry->matchBlockAddr(pkt) &&
                 entry->trySatisfyFunctional(pkt)) {
                 pkt->popLabel();
                 return true;