From 901258c22b631cd7c14e564bd5f1cde36347515e Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 13:05:44 -0500 Subject: cpu: Correctly call parent on switchOut() and takeOverFrom() This patch cleans up the CPU switching functionality by making sure that CPU models consistently call the parent on switchOut() and takeOverFrom(). This has the following implications that might alter current functionality: * The call to BaseCPU::switchout() in the O3 CPU is moved from signalDrained() (!) to switchOut(). * A call to BaseSimpleCPU::switchOut() is introduced in the simple CPUs. --- src/cpu/o3/cpu.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cpu/o3') diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index 2613a8da3..78fbd6694 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -1192,8 +1192,6 @@ FullO3CPU::signalDrained() setDrainState(Drainable::Drained); - BaseCPU::switchOut(); - if (drainManager) { DPRINTF(Drain, "CPU done draining, processing drain event\n"); drainManager->signalDrainDone(); @@ -1207,6 +1205,8 @@ template void FullO3CPU::switchOut() { + BaseCPU::switchOut(); + fetch.switchOut(); rename.switchOut(); iew.switchOut(); -- cgit v1.2.3