summaryrefslogtreecommitdiff
path: root/src/cpu/minor/fetch1.cc
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2016-07-21 17:19:16 +0100
committerMitch Hayenga <mitch.hayenga@arm.com>2016-07-21 17:19:16 +0100
commit752f1c1fe9e74ebb0d373276b332b3242e589208 (patch)
tree66681f689812f3bba1b8c5f9b1cd301fe5490310 /src/cpu/minor/fetch1.cc
parentff4009ac005be0347015f8ba5a8e37a3aa930e69 (diff)
downloadgem5-752f1c1fe9e74ebb0d373276b332b3242e589208.tar.xz
cpu: Fix Minor SMT WFI/drain interaction issues
The behavior of WFI is to cause minor to cease evaluating pipeline logic until an interrupt is observed, however a user may wish to drain the system while a core is sleeping due to a WFI. This patch makes WFI drain. If an actual drain occurs during a WFI, the CPU is already drained and will immediately be ready for swapping, checkpointing, etc. This should not negatively impact performance as WFI instructions are 'stream-changing' (treated like unpredicted branches), so all remaining instructions are wrong-path and will be squashed rapidly. Change-Id: I63833d5acb53d8dde78f9f0c9611de0ece385e45
Diffstat (limited to 'src/cpu/minor/fetch1.cc')
-rw-r--r--src/cpu/minor/fetch1.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpu/minor/fetch1.cc b/src/cpu/minor/fetch1.cc
index f4f120534..f47f54962 100644
--- a/src/cpu/minor/fetch1.cc
+++ b/src/cpu/minor/fetch1.cc
@@ -734,7 +734,7 @@ Fetch1::isDrained()
(numInFlightFetches() == 0 ? "" : "inFlightFetches "),
((*out.inputWire).isBubble() ? "" : "outputtingLine"));
- drained = drained && thread.state == FetchHalted;
+ drained = drained && (thread.state != FetchRunning);
}
return drained;