diff options
Diffstat (limited to 'hw/timer/arm_mptimer.c')
-rw-r--r-- | hw/timer/arm_mptimer.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c index d23462d00e..fbc69c94b7 100644 --- a/hw/timer/arm_mptimer.c +++ b/hw/timer/arm_mptimer.c @@ -49,13 +49,11 @@ typedef struct { static inline int get_current_cpu(ARMMPTimerState *s) { - CPUState *cpu_single_cpu = ENV_GET_CPU(cpu_single_env); - - if (cpu_single_cpu->cpu_index >= s->num_cpu) { + if (current_cpu->cpu_index >= s->num_cpu) { hw_error("arm_mptimer: num-cpu %d but this cpu is %d!\n", - s->num_cpu, cpu_single_cpu->cpu_index); + s->num_cpu, current_cpu->cpu_index); } - return cpu_single_cpu->cpu_index; + return current_cpu->cpu_index; } static inline void timerblock_update_irq(TimerBlock *tb) |