From: Daniel R. Carvalho Date: Mon, 11 Feb 2019 14:41:34 +0000 (+0100) Subject: mem-cache: Remove blk_addr from Queue::trySatisfyFunctional X-Git-Tag: v19.0.0.0~957 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=639b4006ff67f3312d12450d950706fb514f42e9;p=gem5.git mem-cache: Remove blk_addr from Queue::trySatisfyFunctional 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17537 Tested-by: kokoro Reviewed-by: Nikos Nikoleris Maintainer: Nikos Nikoleris --- diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc index 2a6bc2a56..70e7ba186 100644 --- a/src/mem/cache/base.cc +++ b/src/mem/cache/base.cc @@ -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(), diff --git a/src/mem/cache/queue.hh b/src/mem/cache/queue.hh index 30fe4bad6..c75894a76 100644 --- a/src/mem/cache/queue.hh +++ b/src/mem/cache/queue.hh @@ -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;