aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/openpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc/openpic.c')
-rw-r--r--hw/intc/openpic.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index 937e29216b..d984dba7e5 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -180,14 +180,11 @@ static int output_to_inttgt(int output)
static int get_current_cpu(void)
{
- CPUState *cpu_single_cpu;
-
- if (!cpu_single_env) {
+ if (!current_cpu) {
return -1;
}
- cpu_single_cpu = ENV_GET_CPU(cpu_single_env);
- return cpu_single_cpu->cpu_index;
+ return current_cpu->cpu_index;
}
static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr,