]> git.proxmox.com Git - qemu.git/blobdiff - hw/arm_gic.c
cpu: Move cpu_index field to CPUState
[qemu.git] / hw / arm_gic.c
index 466dbf73980f209ba5844f4b0d0f2b14e87923a7..90e43d072875ce176172ed2a5caae03cbe3ff8ce 100644 (file)
@@ -39,7 +39,8 @@ static const uint8_t gic_id[] = {
 static inline int gic_get_current_cpu(GICState *s)
 {
     if (s->num_cpu > 1) {
-        return cpu_single_env->cpu_index;
+        CPUState *cpu = ENV_GET_CPU(cpu_single_env);
+        return cpu->cpu_index;
     }
     return 0;
 }