diff --git a/src/cpu/o3/thread_context.cc b/src/cpu/o3/thread_context.cc index 06210de07e..2eac107c99 100644 --- a/src/cpu/o3/thread_context.cc +++ b/src/cpu/o3/thread_context.cc @@ -86,7 +86,9 @@ ThreadContext::suspend() DPRINTF(O3CPU, "Calling suspend on Thread Context %d\n", threadId()); - if (thread->status() == gem5::ThreadContext::Suspended) + if (thread->status() == gem5::ThreadContext::Suspended || + thread->status() == gem5::ThreadContext::Halting || + thread->status() == gem5::ThreadContext::Halted) return; if (cpu->isDraining()) { diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index c28359a4ed..9e90ce45b8 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -143,7 +143,8 @@ SimpleThread::activate() void SimpleThread::suspend() { - if (status() == ThreadContext::Suspended) + if (status() == ThreadContext::Suspended || + status() == ThreadContext::Halted) return; lastActivate = curTick();