aboutsummaryrefslogtreecommitdiff
path: root/hw/slavio_intctl.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-21 23:33:12 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-21 23:33:12 +0000
commitc68ea7043f2ed4c631d1e3a4f35afe247d5ca063 (patch)
tree64b42bfd3fe62caf019e384cee26e80b98da831d /hw/slavio_intctl.c
parent173d6cfe5129301a3a8f2570223aaa47a815f343 (diff)
cpu_single_env usage fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1644 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/slavio_intctl.c')
-rw-r--r--hw/slavio_intctl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/slavio_intctl.c b/hw/slavio_intctl.c
index 8a5db5c3cd..9780785a47 100644
--- a/hw/slavio_intctl.c
+++ b/hw/slavio_intctl.c
@@ -213,6 +213,7 @@ static const uint32_t intbit_to_level[32] = {
static void slavio_check_interrupts(void *opaque)
{
+ CPUState *env;
SLAVIO_INTCTLState *s = opaque;
uint32_t pending = s->intregm_pending;
unsigned int i, max = 0;
@@ -226,16 +227,17 @@ static void slavio_check_interrupts(void *opaque)
max = intbit_to_level[i];
}
}
- if (cpu_single_env->interrupt_index == 0) {
+ env = first_cpu;
+ if (env->interrupt_index == 0) {
DPRINTF("Triggered pil %d\n", max);
#ifdef DEBUG_IRQ_COUNT
s->irq_count[max]++;
#endif
- cpu_single_env->interrupt_index = TT_EXTINT | max;
- cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HARD);
+ env->interrupt_index = TT_EXTINT | max;
+ cpu_interrupt(env, CPU_INTERRUPT_HARD);
}
else
- DPRINTF("Not triggered (pending %x), pending exception %x\n", pending, cpu_single_env->interrupt_index);
+ DPRINTF("Not triggered (pending %x), pending exception %x\n", pending, env->interrupt_index);
}
else
DPRINTF("Not triggered (pending %x), disabled %x\n", pending, s->intregm_disabled);