From c68ea7043f2ed4c631d1e3a4f35afe247d5ca063 Mon Sep 17 00:00:00 2001 From: bellard Date: Mon, 21 Nov 2005 23:33:12 +0000 Subject: cpu_single_env usage fix git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1644 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/openpic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'hw/openpic.c') diff --git a/hw/openpic.c b/hw/openpic.c index 08fb9bd126..8068e7e590 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -265,7 +265,8 @@ static void IRQ_local_pipe (openpic_t *opp, int n_CPU, int n_IRQ) if (priority > dst->raised.priority) { IRQ_get_next(opp, &dst->raised); DPRINTF("Raise CPU IRQ\n"); - cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HARD); + /* XXX: choose the correct cpu */ + cpu_interrupt(first_cpu, CPU_INTERRUPT_HARD); } } @@ -532,7 +533,7 @@ static void openpic_gbl_write (void *opaque, uint32_t addr, uint32_t val) /* XXX: Should be able to reset any CPU */ if (val & 1) { DPRINTF("Reset CPU IRQ\n"); - // cpu_interrupt(cpu_single_env, CPU_INTERRUPT_RESET); + // cpu_interrupt(first_cpu, CPU_INTERRUPT_RESET); } break; #if MAX_IPI > 0 @@ -781,7 +782,8 @@ static void openpic_cpu_write (void *opaque, uint32_t addr, uint32_t val) src = &opp->src[n_IRQ]; if (IPVP_PRIORITY(src->ipvp) > dst->servicing.priority) { DPRINTF("Raise CPU IRQ\n"); - cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HARD); + /* XXX: choose cpu */ + cpu_interrupt(first_cpu, CPU_INTERRUPT_HARD); } } break; -- cgit v1.2.3