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:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -212,8 +212,6 @@ class ThreadContext : public gem5::ThreadContext
|
||||
return _isa;
|
||||
}
|
||||
|
||||
void initMemProxies(gem5::ThreadContext *tc) override {}
|
||||
|
||||
void sendFunctional(PacketPtr pkt) override;
|
||||
|
||||
Process *
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) */
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -92,7 +92,6 @@ class BaseSimpleCPU : public BaseCPU
|
||||
BaseSimpleCPU(const BaseSimpleCPUParams ¶ms);
|
||||
virtual ~BaseSimpleCPU();
|
||||
void wakeup(ThreadID tid) override;
|
||||
void init() override;
|
||||
public:
|
||||
Trace::InstRecord *traceData;
|
||||
CheckerCPU *checker;
|
||||
|
||||
@@ -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); }
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user