diff options
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/full_cpu/smt.hh | 7 | ||||
-rw-r--r-- | cpu/simple_cpu/simple_cpu.cc | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cpu/full_cpu/smt.hh b/cpu/full_cpu/smt.hh index f9c1e4614..6a4151ffd 100644 --- a/cpu/full_cpu/smt.hh +++ b/cpu/full_cpu/smt.hh @@ -28,17 +28,12 @@ /** * @file - * Defines SMT_MAX_CPUS and SMT_MAX_THREADS. + * Defines SMT_MAX_THREADS. */ #ifndef __SMT_HH__ #define __SMT_HH__ -#ifndef SMT_MAX_CPUS -/** The maximum number of cpus in any one system. */ -#define SMT_MAX_CPUS 4 -#endif - #ifndef SMT_MAX_THREADS /** The number of TPUs in any processor. */ #define SMT_MAX_THREADS 4 diff --git a/cpu/simple_cpu/simple_cpu.cc b/cpu/simple_cpu/simple_cpu.cc index aaf8a9dc5..77f0c41ed 100644 --- a/cpu/simple_cpu/simple_cpu.cc +++ b/cpu/simple_cpu/simple_cpu.cc @@ -193,7 +193,11 @@ SimpleCPU::takeOverFrom(BaseCPU *oldCPU) ExecContext *xc = execContexts[i]; if (xc->status() == ExecContext::Active && _status != Running) { _status = Running; - tickEvent.schedule(curTick); + // the CpuSwitchEvent has a low priority, so it's + // scheduled *after* the current cycle's tick event. Thus + // the first tick event for the new context should take + // place on the *next* cycle. + tickEvent.schedule(curTick+1); } } @@ -849,3 +853,4 @@ CREATE_SIM_OBJECT(SimpleCPU) } REGISTER_SIM_OBJECT("SimpleCPU", SimpleCPU) + |