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>
This commit is contained in:
Gabe Black
2021-05-23 03:50:43 -07:00
committed by Gabe Black
parent a6e023906e
commit 7daeed83f7
13 changed files with 2 additions and 75 deletions

View File

@@ -66,14 +66,6 @@ BaseCPU::totalInsts() const
return count;
}
void
BaseCPU::init()
{
gem5::BaseCPU::init();
for (auto *tc: threadContexts)
tc->initMemProxies(tc);
}
void
BaseCPU::serializeThread(CheckpointOut &cp, ThreadID tid) const
{

View File

@@ -100,8 +100,6 @@ class BaseCPU : public gem5::BaseCPU
evs_base_cpu->setClkPeriod(clockPeriod());
}
void init() override;
void serializeThread(CheckpointOut &cp, ThreadID tid) const override;
};

View File

@@ -212,8 +212,6 @@ class ThreadContext : public gem5::ThreadContext
return _isa;
}
void initMemProxies(gem5::ThreadContext *tc) override {}
void sendFunctional(PacketPtr pkt) override;
Process *

View File

@@ -167,12 +167,6 @@ class CheckerThreadContext : public ThreadContext
void setProcessPtr(Process *p) override { actualTC->setProcessPtr(p); }
void
initMemProxies(ThreadContext *tc) override
{
actualTC->initMemProxies(tc);
}
void
connectMemPorts(ThreadContext *tc)
{

View File

@@ -109,11 +109,7 @@ void
BaseKvmCPU::init()
{
BaseCPU::init();
if (numThreads != 1)
fatal("KVM: Multithreading not supported");
tc->initMemProxies(tc);
fatal_if(numThreads != 1, "KVM: Multithreading not supported");
}
void

View File

@@ -101,19 +101,10 @@ MinorCPU::init()
{
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) */

View File

@@ -564,8 +564,6 @@ CPU::init()
// 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.

View File

@@ -143,12 +143,6 @@ class ThreadContext : public gem5::ThreadContext
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(); }

View File

@@ -118,17 +118,6 @@ BaseSimpleCPU::BaseSimpleCPU(const BaseSimpleCPUParams &p)
}
}
void
BaseSimpleCPU::init()
{
BaseCPU::init();
for (auto tc : threadContexts) {
// Initialise the ThreadContext's memory proxies
tc->initMemProxies(tc);
}
}
void
BaseSimpleCPU::checkPcEventQueue()
{

View File

@@ -92,7 +92,6 @@ class BaseSimpleCPU : public BaseCPU
BaseSimpleCPU(const BaseSimpleCPUParams &params);
virtual ~BaseSimpleCPU();
void wakeup(ThreadID tid) override;
void init() override;
public:
Trace::InstRecord *traceData;
CheckerCPU *checker;

View File

@@ -216,12 +216,6 @@ class SimpleThread : public ThreadState, public ThreadContext
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); }

View File

@@ -149,14 +149,6 @@ class ThreadContext : public PCEventScope
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;

View File

@@ -72,14 +72,6 @@ struct ThreadState : public Serializable
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; }