qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH qom-next 23/59] ppc: Pass PowerPCCPU to ppc40x_set_i


From: Andreas Färber
Subject: [Qemu-devel] [PATCH qom-next 23/59] ppc: Pass PowerPCCPU to ppc40x_set_irq()
Date: Wed, 23 May 2012 05:07:46 +0200

Needed for qemu_cpu_kick() and moving halted field to CPUState.

Signed-off-by: Andreas Färber <address@hidden>
---
 hw/ppc.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/hw/ppc.c b/hw/ppc.c
index de1a33b..fc3a65c 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -283,9 +283,10 @@ void ppcPOWER7_irq_init(CPUPPCState *env)
 #endif /* defined(TARGET_PPC64) */
 
 /* PowerPC 40x internal IRQ controller */
-static void ppc40x_set_irq (void *opaque, int pin, int level)
+static void ppc40x_set_irq(void *opaque, int pin, int level)
 {
-    CPUPPCState *env = opaque;
+    PowerPCCPU *cpu = opaque;
+    CPUPPCState *env = &cpu->env;
     int cur_level;
 
     LOG_IRQ("%s: env %p pin %d level %d\n", __func__,
@@ -355,10 +356,12 @@ static void ppc40x_set_irq (void *opaque, int pin, int 
level)
     }
 }
 
-void ppc40x_irq_init (CPUPPCState *env)
+void ppc40x_irq_init(CPUPPCState *env)
 {
+    PowerPCCPU *cpu = ppc_env_get_cpu(env);
+
     env->irq_inputs = (void **)qemu_allocate_irqs(&ppc40x_set_irq,
-                                                  env, PPC40x_INPUT_NB);
+                                                  cpu, PPC40x_INPUT_NB);
 }
 
 /* PowerPC E500 internal IRQ controller */
-- 
1.7.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]