summaryrefslogtreecommitdiff
path: root/src/cpu/minor/fetch2.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/fetch2.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/fetch2.cc')
-rw-r--r--src/cpu/minor/fetch2.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cpu/minor/fetch2.cc b/src/cpu/minor/fetch2.cc
index ae02b1c22..394fe8549 100644
--- a/src/cpu/minor/fetch2.cc
+++ b/src/cpu/minor/fetch2.cc
@@ -563,8 +563,7 @@ Fetch2::getScheduledThread()
}
for (auto tid : priority_list) {
- if (cpu.getContext(tid)->status() == ThreadContext::Active &&
- getInput(tid) && !fetchInfo[tid].blocked) {
+ if (getInput(tid) && !fetchInfo[tid].blocked) {
threadPriority = tid;
return tid;
}