From: Andreas Sandberg Date: Thu, 30 Jul 2015 09:15:50 +0000 (+0100) Subject: cpu: Fix drain issues in the Minor CPU X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=473a0dcc63135a32cc5f736c14a3142a34b4352e;p=gem5.git 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. --- 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;