mem: Remove the version of the FS translating port proxy with no tc.
authorGabe Black <gabeblack@google.com>
Tue, 3 Mar 2020 00:46:12 +0000 (16:46 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 5 Mar 2020 02:59:34 +0000 (02:59 +0000)
This version is not used and is the only remaining consumer of the
vtophys variant with no ThreadContext.

Change-Id: I8cb870b841fe064cee121e4930cb163d2ec7628f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26223
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/fs_translating_port_proxy.cc
src/mem/fs_translating_port_proxy.hh

index aaa86560f36df4129bedfe63bc837d5580386c8a..ea62fe65d80a8b5ab1f68dcec78fac09d792189e 100644 (file)
@@ -57,29 +57,13 @@ FSTranslatingPortProxy::FSTranslatingPortProxy(ThreadContext *tc)
 {
 }
 
-FSTranslatingPortProxy::FSTranslatingPortProxy(
-        SendFunctionalFunc func, unsigned int cacheLineSize)
-    : PortProxy(func, cacheLineSize), _tc(NULL)
-{
-}
-
-FSTranslatingPortProxy::FSTranslatingPortProxy(
-        MasterPort &port, unsigned int cacheLineSize)
-    : PortProxy(port, cacheLineSize), _tc(NULL)
-{
-}
-
 bool
 FSTranslatingPortProxy::tryReadBlob(Addr addr, void *p, int size) const
 {
-    Addr paddr;
     for (ChunkGenerator gen(addr, size, TheISA::PageBytes); !gen.done();
          gen.next())
     {
-        if (_tc)
-            paddr = TheISA::vtophys(_tc,gen.addr());
-        else
-            paddr = TheISA::vtophys(gen.addr());
+        Addr paddr = TheISA::vtophys(_tc, gen.addr());
 
         PortProxy::readBlobPhys(paddr, 0, p, gen.size());
         p = static_cast<uint8_t *>(p) + gen.size();
@@ -91,14 +75,10 @@ bool
 FSTranslatingPortProxy::tryWriteBlob(
         Addr addr, const void *p, int size) const
 {
-    Addr paddr;
     for (ChunkGenerator gen(addr, size, TheISA::PageBytes); !gen.done();
          gen.next())
     {
-        if (_tc)
-            paddr = TheISA::vtophys(_tc,gen.addr());
-        else
-            paddr = TheISA::vtophys(gen.addr());
+        Addr paddr = TheISA::vtophys(_tc, gen.addr());
 
         PortProxy::writeBlobPhys(paddr, 0, p, gen.size());
         p = static_cast<const uint8_t *>(p) + gen.size();
@@ -109,14 +89,10 @@ FSTranslatingPortProxy::tryWriteBlob(
 bool
 FSTranslatingPortProxy::tryMemsetBlob(Addr address, uint8_t v, int size) const
 {
-    Addr paddr;
     for (ChunkGenerator gen(address, size, TheISA::PageBytes); !gen.done();
          gen.next())
     {
-        if (_tc)
-            paddr = TheISA::vtophys(_tc,gen.addr());
-        else
-            paddr = TheISA::vtophys(gen.addr());
+        Addr paddr = TheISA::vtophys(_tc, gen.addr());
 
         PortProxy::memsetBlobPhys(paddr, 0, v, gen.size());
     }
index fd1a331e382e1fa737190f552a2b11ae4ec0dbd9..c1c4339b903d509e3d8e863b20e87cd18ff53426 100644 (file)
@@ -75,12 +75,6 @@ class FSTranslatingPortProxy : public PortProxy
   public:
 
     FSTranslatingPortProxy(ThreadContext* tc);
-
-    FSTranslatingPortProxy(SendFunctionalFunc func,
-                           unsigned int cacheLineSize);
-    FSTranslatingPortProxy(MasterPort &port,
-                           unsigned int cacheLineSize);
-
     ~FSTranslatingPortProxy() {}
 
     /** Version of tryReadblob that translates virt->phys and deals