mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
apic: avoid passing CPUState from devices
Pass only APICState from pc.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
9605111958
commit
cf6d64bfd9
3 changed files with 25 additions and 25 deletions
10
hw/pc.c
10
hw/pc.c
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue