cpu: Fix drain issues in the Minor CPU
authorAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 30 Jul 2015 09:15:50 +0000 (10:15 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 30 Jul 2015 09:15:50 +0000 (10:15 +0100)
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

index a93d0037da156f459a4b7e55379138ff5221b809..aefd5599d557c74178678f304431b881eae146f2 100644 (file)
@@ -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;