Patchwork [v2,1/5] sun4m: Pass SPARCCPU to cpu_set_irq()

login
register
mail settings
Submitter Andreas Färber
Date Oct. 12, 2012, 2:23 a.m.
Message ID <1350008589-30711-2-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/191045/
State New
Headers show

Comments

Andreas Färber - Oct. 12, 2012, 2:23 a.m.
Needed for changing cpu_kick_irq() argument type to SPARCCPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/sun4m.c |    5 +++--
 1 Datei geändert, 3 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)

Patch

diff --git a/hw/sun4m.c b/hw/sun4m.c
index c98cd5e..c1ee8bd 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -262,7 +262,8 @@  static void cpu_kick_irq(CPUSPARCState *env)
 
 static void cpu_set_irq(void *opaque, int irq, int level)
 {
-    CPUSPARCState *env = opaque;
+    SPARCCPU *cpu = opaque;
+    CPUSPARCState *env = &cpu->env;
 
     if (level) {
         trace_sun4m_cpu_set_irq_raise(irq);
@@ -840,7 +841,7 @@  static void cpu_devinit(const char *cpu_model, unsigned int id,
         qemu_register_reset(secondary_cpu_reset, cpu);
         env->halted = 1;
     }
-    *cpu_irqs = qemu_allocate_irqs(cpu_set_irq, env, MAX_PILS);
+    *cpu_irqs = qemu_allocate_irqs(cpu_set_irq, cpu, MAX_PILS);
     env->prom_addr = prom_addr;
 }