cpu,fastmodel: Eliminate the now unnecessary initMemProxies method.

The proxies this method initializes no longer exist, since they're now
created locally.

Change-Id: I5fd1c99fbc00f5057ea8868e91be02d577b1c176
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45909
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
diff --git a/src/arch/arm/fastmodel/iris/cpu.cc b/src/arch/arm/fastmodel/iris/cpu.cc
index db5fa60..5f406e0 100644
--- a/src/arch/arm/fastmodel/iris/cpu.cc
+++ b/src/arch/arm/fastmodel/iris/cpu.cc
@@ -67,14 +67,6 @@
 }
 
 void
-BaseCPU::init()
-{
-    gem5::BaseCPU::init();
-    for (auto *tc: threadContexts)
-        tc->initMemProxies(tc);
-}
-
-void
 BaseCPU::serializeThread(CheckpointOut &cp, ThreadID tid) const
 {
     gem5::serialize(*threadContexts[tid], cp);
diff --git a/src/arch/arm/fastmodel/iris/cpu.hh b/src/arch/arm/fastmodel/iris/cpu.hh
index 75db722..5cb8820 100644
--- a/src/arch/arm/fastmodel/iris/cpu.hh
+++ b/src/arch/arm/fastmodel/iris/cpu.hh
@@ -100,8 +100,6 @@
         evs_base_cpu->setClkPeriod(clockPeriod());
     }
 
-    void init() override;
-
     void serializeThread(CheckpointOut &cp, ThreadID tid) const override;
 };
 
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh b/src/arch/arm/fastmodel/iris/thread_context.hh
index 0266053..eadd089 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -212,8 +212,6 @@
         return _isa;
     }
 
-    void initMemProxies(gem5::ThreadContext *tc) override {}
-
     void sendFunctional(PacketPtr pkt) override;
 
     Process *
diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh
index b9abf53..f7f340e 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -168,12 +168,6 @@
     void setProcessPtr(Process *p) override { actualTC->setProcessPtr(p); }
 
     void
-    initMemProxies(ThreadContext *tc) override
-    {
-        actualTC->initMemProxies(tc);
-    }
-
-    void
     connectMemPorts(ThreadContext *tc)
     {
         actualTC->connectMemPorts(tc);
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc
index fa5ff99..b43bee5 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -109,11 +109,7 @@
 BaseKvmCPU::init()
 {
     BaseCPU::init();
-
-    if (numThreads != 1)
-        fatal("KVM: Multithreading not supported");
-
-    tc->initMemProxies(tc);
+    fatal_if(numThreads != 1, "KVM: Multithreading not supported");
 }
 
 void
diff --git a/src/cpu/minor/cpu.cc b/src/cpu/minor/cpu.cc
index 713acc5..cd9a11a 100644
--- a/src/cpu/minor/cpu.cc
+++ b/src/cpu/minor/cpu.cc
@@ -101,19 +101,10 @@
 {
     BaseCPU::init();
 
-    if (!params().switched_out &&
-        system->getMemoryMode() != enums::timing)
-    {
+    if (!params().switched_out && system->getMemoryMode() != enums::timing) {
         fatal("The Minor CPU requires the memory system to be in "
             "'timing' mode.\n");
     }
-
-    /* Initialise the ThreadContext's memory proxies */
-    for (ThreadID thread_id = 0; thread_id < threads.size(); thread_id++) {
-        ThreadContext *tc = getContext(thread_id);
-
-        tc->initMemProxies(tc);
-    }
 }
 
 /** Stats interface from SimObject (by way of BaseCPU) */
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index fbdfcbd..c08af0c 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -564,8 +564,6 @@
         // Set noSquashFromTC so that the CPU doesn't squash when initially
         // setting up registers.
         thread[tid]->noSquashFromTC = true;
-        // Initialise the ThreadContext's memory proxies
-        thread[tid]->initMemProxies(thread[tid]->getTC());
     }
 
     // Clear noSquashFromTC.
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index e022abd..759785b 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -143,12 +143,6 @@
 
     void setProcessPtr(Process *p) override { thread->setProcessPtr(p); }
 
-    void
-    initMemProxies(gem5::ThreadContext *tc) override
-    {
-        thread->initMemProxies(tc);
-    }
-
     /** Returns this thread's status. */
     Status status() const override { return thread->status(); }
 
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 2047158..8854e9a 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -119,17 +119,6 @@
 }
 
 void
-BaseSimpleCPU::init()
-{
-    BaseCPU::init();
-
-    for (auto tc : threadContexts) {
-        // Initialise the ThreadContext's memory proxies
-        tc->initMemProxies(tc);
-    }
-}
-
-void
 BaseSimpleCPU::checkPcEventQueue()
 {
     Addr oldpc, pc = threadInfo[curThread]->thread->instAddr();
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh
index ee75d78..4e94e5c 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -92,7 +92,6 @@
     BaseSimpleCPU(const BaseSimpleCPUParams &params);
     virtual ~BaseSimpleCPU();
     void wakeup(ThreadID tid) override;
-    void init() override;
   public:
     Trace::InstRecord *traceData;
     CheckerCPU *checker;
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index bec4bf5..37f666c 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -216,12 +216,6 @@
 
     System *getSystemPtr() override { return system; }
 
-    void
-    initMemProxies(ThreadContext *tc) override
-    {
-        ThreadState::initMemProxies(tc);
-    }
-
     Process *getProcessPtr() override { return ThreadState::getProcessPtr(); }
     void setProcessPtr(Process *p) override { ThreadState::setProcessPtr(p); }
 
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index 355bd85..bbe084a 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -149,14 +149,6 @@
 
     virtual void sendFunctional(PacketPtr pkt);
 
-    /**
-     * Initialise the physical and virtual port proxies and tie them to
-     * the data port of the CPU.
-     *
-     * tc ThreadContext for the virtual-to-physical translation
-     */
-    virtual void initMemProxies(ThreadContext *tc) = 0;
-
     virtual Process *getProcessPtr() = 0;
 
     virtual void setProcessPtr(Process *p) = 0;
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index b98eee2..c95ad33 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -72,14 +72,6 @@
 
     Tick readLastSuspend() const { return lastSuspend; }
 
-    /**
-     * Initialise the physical and virtual port proxies and tie them to
-     * the data port of the CPU.
-     *
-     * @param tc ThreadContext for the virtual-to-physical translation
-     */
-    void initMemProxies(ThreadContext *tc) {}
-
     Process *getProcessPtr() { return process; }
 
     void setProcessPtr(Process *p) { process = p; }