]> Git Repo - qemu.git/blobdiff - hw/arm_pic.c
arm_pic: Pass ARMCPU to arm_pic_init_cpu()
[qemu.git] / hw / arm_pic.c
index 109496528cc64dabe826d4ec884c9f038c3b1843..ffb4d4171a587249fa01acdc01ee06765a7b7a4b 100644 (file)
@@ -13,7 +13,9 @@
 /* Input 0 is IRQ and input 1 is FIQ.  */
 static void arm_pic_cpu_handler(void *opaque, int irq, int level)
 {
-    CPUARMState *env = (CPUARMState *)opaque;
+    ARMCPU *cpu = opaque;
+    CPUARMState *env = &cpu->env;
+
     switch (irq) {
     case ARM_PIC_CPU_IRQ:
         if (level)
@@ -32,7 +34,7 @@ static void arm_pic_cpu_handler(void *opaque, int irq, int level)
     }
 }
 
-qemu_irq *arm_pic_init_cpu(CPUARMState *env)
+qemu_irq *arm_pic_init_cpu(ARMCPU *cpu)
 {
-    return qemu_allocate_irqs(arm_pic_cpu_handler, env, 2);
+    return qemu_allocate_irqs(arm_pic_cpu_handler, cpu, 2);
 }
This page took 0.023839 seconds and 4 git commands to generate.