mem: Replace any getDTBPtr/getITBPtr usage
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 14 Sep 2020 08:55:49 +0000 (09:55 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 26 Oct 2020 09:20:08 +0000 (09:20 +0000)
JIRA: https://gem5.atlassian.net/browse/GEM5-790

Change-Id: I0759baec87b3682a057239a6b3b8f79fe3f5592c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34983
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/translating_port_proxy.cc

index 1e8d8365002dc6b8e742771f6e9bb53d430ec9de..27a2d67c67664fa799dbb02c9ba822c1fb20d370 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "mem/translating_port_proxy.hh"
 
+#include "arch/generic/mmu.hh"
 #include "base/chunk_generator.hh"
 #include "cpu/base.hh"
 #include "cpu/thread_context.hh"
@@ -61,10 +62,9 @@ TranslatingPortProxy::TranslatingPortProxy(
 bool
 TranslatingPortProxy::tryTLBsOnce(RequestPtr req, BaseTLB::Mode mode) const
 {
-    BaseTLB *dtb = _tc->getDTBPtr();
-    BaseTLB *itb = _tc->getDTBPtr();
-    return dtb->translateFunctional(req, _tc, mode) == NoFault ||
-           itb->translateFunctional(req, _tc, BaseTLB::Read) == NoFault;
+    BaseMMU *mmu = _tc->getMMUPtr();
+    return mmu->translateFunctional(req, _tc, mode) == NoFault ||
+           mmu->translateFunctional(req, _tc, BaseTLB::Execute) == NoFault;
 }
 
 bool