diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-14 04:21:52 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-11 00:23:04 +0200 |
commit | 4bd7466166b8c1b612c7f01a124b24ab2a0ace14 (patch) | |
tree | 75891417cf185f4ea58b7d60d3e5ebccb33c9e86 /hw/arm_pic.c | |
parent | 3aaa8dfae955d7bec462cc4e2fce185ef6d41b5a (diff) |
arm_pic: Pass ARMCPU to arm_pic_init_cpu()
Pass it through to arm_pic_cpu_handler().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos)
Diffstat (limited to 'hw/arm_pic.c')
-rw-r--r-- | hw/arm_pic.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/arm_pic.c b/hw/arm_pic.c index 109496528c..ffb4d4171a 100644 --- a/hw/arm_pic.c +++ b/hw/arm_pic.c @@ -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); } |