From 473a0dcc63135a32cc5f736c14a3142a34b4352e Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 30 Jul 2015 10:15:50 +0100 Subject: [PATCH] cpu: Fix drain issues in the Minor CPU The drain refactor patches introduced a couple of bugs in the way Minor handles draining. This patch fixes an incorrect assert and a case of infinite recursion when the CPU signals drain done. --- src/cpu/minor/cpu.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cpu/minor/cpu.cc b/src/cpu/minor/cpu.cc index a93d0037d..aefd5599d 100644 --- a/src/cpu/minor/cpu.cc +++ b/src/cpu/minor/cpu.cc @@ -213,14 +213,12 @@ void MinorCPU::signalDrainDone() { DPRINTF(Drain, "MinorCPU drain done\n"); - signalDrainDone(); + Drainable::signalDrainDone(); } void MinorCPU::drainResume() { - assert(drainState() == DrainState::Drained); - if (switchedOut()) { DPRINTF(Drain, "drainResume while switched out. Ignoring\n"); return; -- 2.30.2