]> git.proxmox.com Git - qemu.git/blobdiff - hw/openpic.c
cpu: Move cpu_index field to CPUState
[qemu.git] / hw / openpic.c
index 23fa8f96354e048a747876667311d39fb97781a0..f6cc07bd6e5a53465c4494d1e3a8befd8d1b0644 100644 (file)
@@ -153,11 +153,14 @@ static const int debug_openpic = 0;
 
 static int get_current_cpu(void)
 {
+    CPUState *cpu_single_cpu;
+
     if (!cpu_single_env) {
         return -1;
     }
 
-    return cpu_single_env->cpu_index;
+    cpu_single_cpu = ENV_GET_CPU(cpu_single_env);
+    return cpu_single_cpu->cpu_index;
 }
 
 static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr,