diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-06-19 10:42:08 +0300 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-06-19 10:42:08 +0300 |
commit | cf6d64bfd9ae93d14502f057d8a0917162004dc7 (patch) | |
tree | 5132092738bd499e2e528a32ab5bb781849f97cf /hw/pc.c | |
parent | 9605111958173938ac08298f515d55e937d0211c (diff) |
apic: avoid passing CPUState from devices
Pass only APICState from pc.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -145,7 +145,7 @@ int cpu_get_pic_interrupt(CPUState *env) { int intno; - intno = apic_get_interrupt(env); + intno = apic_get_interrupt(env->apic_state); if (intno >= 0) { /* set irq request if a PIC irq is still pending */ /* XXX: improve that */ @@ -153,8 +153,9 @@ int cpu_get_pic_interrupt(CPUState *env) return intno; } /* read the irq from the PIC */ - if (!apic_accept_pic_intr(env)) + if (!apic_accept_pic_intr(env->apic_state)) { return -1; + } intno = pic_read_irq(isa_pic); return intno; @@ -167,8 +168,9 @@ static void pic_irq_request(void *opaque, int irq, int level) DPRINTF("pic_irqs: %s irq %d\n", level? "raise" : "lower", irq); if (env->apic_state) { while (env) { - if (apic_accept_pic_intr(env)) - apic_deliver_pic_intr(env, level); + if (apic_accept_pic_intr(env->apic_state)) { + apic_deliver_pic_intr(env->apic_state, level); + } env = env->next_cpu; } } else { |