summaryrefslogtreecommitdiff
path: root/src/cpu/o3
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/o3')
-rw-r--r--src/cpu/o3/cpu.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 0695711f1..091c3a6ad 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1031,6 +1031,9 @@ template <class Impl>
DrainState
FullO3CPU<Impl>::drain()
{
+ // Deschedule any power gating event (if any)
+ deschedulePowerGatingEvent();
+
// If the CPU isn't doing anything, then return immediately.
if (switchedOut())
return DrainState::Drained;
@@ -1186,6 +1189,9 @@ FullO3CPU<Impl>::drainResume()
assert(!tickEvent.scheduled());
if (_status == Running)
schedule(tickEvent, nextCycle());
+
+ // Reschedule any power gating event (if any)
+ schedulePowerGatingEvent();
}
template <class Impl>