Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/45909 )
Change subject: cpu,fastmodel: Eliminate the now unnecessary initMemProxies
method.
......................................................................
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
---
M src/arch/arm/fastmodel/iris/cpu.cc
M src/arch/arm/fastmodel/iris/cpu.hh
M src/arch/arm/fastmodel/iris/thread_context.hh
M src/cpu/checker/thread_context.hh
M src/cpu/kvm/base.cc
M src/cpu/minor/cpu.cc
M src/cpu/o3/cpu.cc
M src/cpu/o3/thread_context.hh
M src/cpu/simple/base.cc
M src/cpu/simple/base.hh
M src/cpu/simple_thread.hh
M src/cpu/thread_context.hh
M src/cpu/thread_state.hh
13 files changed, 2 insertions(+), 75 deletions(-)
diff --git a/src/arch/arm/fastmodel/iris/cpu.cc
b/src/arch/arm/fastmodel/iris/cpu.cc
index a155dea..5de2c00 100644
--- a/src/arch/arm/fastmodel/iris/cpu.cc
+++ b/src/arch/arm/fastmodel/iris/cpu.cc
@@ -64,14 +64,6 @@
}
void
-BaseCPU::init()
-{
- ::BaseCPU::init();
- for (auto *tc: threadContexts)
- tc->initMemProxies(tc);
-}
-
-void
BaseCPU::serializeThread(CheckpointOut &cp, ThreadID tid) const
{
::serialize(*threadContexts[tid], cp);
diff --git a/src/arch/arm/fastmodel/iris/cpu.hh
b/src/arch/arm/fastmodel/iris/cpu.hh
index 7ae0f7f..a93a205 100644
--- a/src/arch/arm/fastmodel/iris/cpu.hh
+++ b/src/arch/arm/fastmodel/iris/cpu.hh
@@ -97,8 +97,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 54a3c5a..e7e8697 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -208,8 +208,6 @@
return _isa;
}
- void initMemProxies(::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 9b7d73b..197c09d 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -150,12 +150,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 124bbd2..cd5781b 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -106,11 +106,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 1c23f2d..fb8d1db 100644
--- a/src/cpu/minor/cpu.cc
+++ b/src/cpu/minor/cpu.cc
@@ -98,19 +98,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 ce83b5b..5997be8 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -563,8 +563,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 8a6ea2d..ee33c88 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -137,12 +137,6 @@
void setProcessPtr(Process *p) override { thread->setProcessPtr(p); }
- void
- initMemProxies(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 e51f5a5..e988210 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -117,17 +117,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 9d921b6..d98af73 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -93,7 +93,6 @@
BaseSimpleCPU(const BaseSimpleCPUParams ¶ms);
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 61cadec..2fa7b02 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -213,12 +213,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 6831caf..afc1fa7 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -146,14 +146,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 2571ae5..f2e9da6 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -71,14 +71,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; }
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45909
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I5fd1c99fbc00f5057ea8868e91be02d577b1c176
Gerrit-Change-Number: 45909
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s