Revert "cpu: stop scheduling suspended threads in MinorCPU"
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 1 Mar 2019 13:56:25 +0000 (13:56 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 14 May 2019 08:44:37 +0000 (08:44 +0000)
This reverts commit 6a6668bbc4b038b98eb3ee64ffb034719316afd9.
The commit was part of a patchset which broke MinorCPU regressions
(switcheroo)

Change-Id: I3c16a6478ba44b9d27cdd3d64a710a356999df05
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18603
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/minor/decode.cc
src/cpu/minor/execute.cc
src/cpu/minor/fetch2.cc

index 94d3dec03299697064e8f501157366bea5bf7582..390ca5f114a29b305063507f2cdf4f7b59837cc6 100644 (file)
@@ -314,9 +314,7 @@ Decode::getScheduledThread()
     }
 
     for (auto tid : priority_list) {
-        if (cpu.getContext(tid)->status() == ThreadContext::Active &&
-            getInput(tid) &&
-            !decodeInfo[tid].blocked) {
+        if (getInput(tid) && !decodeInfo[tid].blocked) {
             threadPriority = tid;
             return tid;
         }
index 6d751badebbb59b66d6fa5c8752323df4215ff61..81d310bba89c2fdd53b95382222fc515a10446de 100644 (file)
@@ -1683,12 +1683,7 @@ Execute::getCommittingThread()
 
     for (auto tid : priority_list) {
         ExecuteThreadInfo &ex_info = executeInfo[tid];
-
-        bool is_thread_active =
-                cpu.getContext(tid)->status() == ThreadContext::Active;
-        bool can_commit_insts = !ex_info.inFlightInsts->empty() &&
-                                is_thread_active;
-
+        bool can_commit_insts = !ex_info.inFlightInsts->empty();
         if (can_commit_insts) {
             QueuedInst *head_inflight_inst = &(ex_info.inFlightInsts->front());
             MinorDynInstPtr inst = head_inflight_inst->inst;
@@ -1754,8 +1749,7 @@ Execute::getIssuingThread()
     }
 
     for (auto tid : priority_list) {
-        if (cpu.getContext(tid)->status() == ThreadContext::Active &&
-            getInput(tid)) {
+        if (getInput(tid)) {
             issuePriority = tid;
             return tid;
         }
index 9347e4ccbe4ed3d0c99e8eb51dfc100cf5b35f36..b374ee9bf90b8ee557ef9eea3b614302753195cc 100644 (file)
@@ -586,9 +586,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;
         }