From 74afea471d6f3763b726cf3459b401fa62b74b54 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 12 Jun 2024 00:20:06 -0700 Subject: [PATCH] cpu: Revert "Don't change to suspend if the thread status is halted" (#1225) Reverts gem5/gem5#1039 --- src/cpu/o3/thread_context.cc | 4 +--- src/cpu/simple_thread.cc | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/cpu/o3/thread_context.cc b/src/cpu/o3/thread_context.cc index 2eac107c99..06210de07e 100644 --- a/src/cpu/o3/thread_context.cc +++ b/src/cpu/o3/thread_context.cc @@ -86,9 +86,7 @@ ThreadContext::suspend() DPRINTF(O3CPU, "Calling suspend on Thread Context %d\n", threadId()); - if (thread->status() == gem5::ThreadContext::Suspended || - thread->status() == gem5::ThreadContext::Halting || - thread->status() == gem5::ThreadContext::Halted) + if (thread->status() == gem5::ThreadContext::Suspended) return; if (cpu->isDraining()) { diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index 9e90ce45b8..c28359a4ed 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -143,8 +143,7 @@ SimpleThread::activate() void SimpleThread::suspend() { - if (status() == ThreadContext::Suspended || - status() == ThreadContext::Halted) + if (status() == ThreadContext::Suspended) return; lastActivate = curTick();