o3, inorder: fix FS bug due to initializing ThreadState to Halted.
For some reason o3 FS init() only called initCPU if the thread state was Suspended, which was no longer the case. There's no apparent reason to check, so I whacked the test completely rather than changing the check to Halted. The inorder init() was also updated to be symmetric, though the previous code was just a fancy no-op.
This commit is contained in:
parent
b146131d18
commit
14808ecac9
2 changed files with 8 additions and 19 deletions
|
@ -29,6 +29,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config/full_system.hh"
|
||||||
|
|
||||||
#include "arch/utility.hh"
|
#include "arch/utility.hh"
|
||||||
#include "cpu/exetrace.hh"
|
#include "cpu/exetrace.hh"
|
||||||
#include "cpu/activity.hh"
|
#include "cpu/activity.hh"
|
||||||
|
@ -420,16 +422,12 @@ InOrderCPU::init()
|
||||||
for (int i = 0; i < number_of_threads; ++i)
|
for (int i = 0; i < number_of_threads; ++i)
|
||||||
thread[i]->inSyscall = true;
|
thread[i]->inSyscall = true;
|
||||||
|
|
||||||
|
#if FULL_SYSTEM
|
||||||
for (int tid=0; tid < number_of_threads; tid++) {
|
for (int tid=0; tid < number_of_threads; tid++) {
|
||||||
|
ThreadContext *src_tc = threadContexts[tid];
|
||||||
ThreadContext *src_tc = thread[tid]->getTC();
|
TheISA::initCPU(src_tc, src_tc->contextId());
|
||||||
|
|
||||||
// Threads start in the Suspended State
|
|
||||||
if (src_tc->status() != ThreadContext::Suspended) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clear inSyscall.
|
// Clear inSyscall.
|
||||||
for (int i = 0; i < number_of_threads; ++i)
|
for (int i = 0; i < number_of_threads; ++i)
|
||||||
|
|
|
@ -568,21 +568,12 @@ FullO3CPU<Impl>::init()
|
||||||
for (int i = 0; i < number_of_threads; ++i)
|
for (int i = 0; i < number_of_threads; ++i)
|
||||||
thread[i]->inSyscall = true;
|
thread[i]->inSyscall = true;
|
||||||
|
|
||||||
|
#if FULL_SYSTEM
|
||||||
for (int tid=0; tid < number_of_threads; tid++) {
|
for (int tid=0; tid < number_of_threads; tid++) {
|
||||||
#if FULL_SYSTEM
|
|
||||||
ThreadContext *src_tc = threadContexts[tid];
|
ThreadContext *src_tc = threadContexts[tid];
|
||||||
#else
|
|
||||||
ThreadContext *src_tc = thread[tid]->getTC();
|
|
||||||
#endif
|
|
||||||
// Threads start in the Suspended State
|
|
||||||
if (src_tc->status() != ThreadContext::Suspended) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if FULL_SYSTEM
|
|
||||||
TheISA::initCPU(src_tc, src_tc->contextId());
|
TheISA::initCPU(src_tc, src_tc->contextId());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clear inSyscall.
|
// Clear inSyscall.
|
||||||
for (int i = 0; i < number_of_threads; ++i)
|
for (int i = 0; i < number_of_threads; ++i)
|
||||||
|
|
Loading…
Reference in a new issue