Fix OMAP pic handling of simultaneous interrupts.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3095 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
balrog 2007-07-31 01:42:29 +00:00
parent 724d3a8f29
commit cfa0b71dd8

View File

@ -70,16 +70,20 @@ struct omap_intr_handler_s {
static void omap_inth_update(struct omap_intr_handler_s *s) static void omap_inth_update(struct omap_intr_handler_s *s)
{ {
uint32_t irq = s->new_irq_agr & s->irqs & ~s->mask & ~s->fiq; uint32_t irq = s->irqs & ~s->mask & ~s->fiq;
uint32_t fiq = s->new_fiq_agr & s->irqs & ~s->mask & s->fiq; uint32_t fiq = s->irqs & ~s->mask & s->fiq;
qemu_set_irq(s->parent_pic[ARM_PIC_CPU_IRQ], irq); if (s->new_irq_agr || !irq) {
if (irq) qemu_set_irq(s->parent_pic[ARM_PIC_CPU_IRQ], irq);
s->new_irq_agr = 0; if (irq)
s->new_irq_agr = 0;
}
qemu_set_irq(s->parent_pic[ARM_PIC_CPU_FIQ], fiq); if (s->new_fiq_agr || !irq) {
if (fiq) qemu_set_irq(s->parent_pic[ARM_PIC_CPU_FIQ], fiq);
s->new_fiq_agr = 0; if (fiq)
s->new_fiq_agr = 0;
}
} }
static void omap_inth_sir_update(struct omap_intr_handler_s *s) static void omap_inth_sir_update(struct omap_intr_handler_s *s)
@ -124,7 +128,7 @@ static void omap_set_intr(void *opaque, int irq, int req)
if (req) { if (req) {
rise = ~ih->irqs & (1 << irq); rise = ~ih->irqs & (1 << irq);
ih->irqs |= rise; ih->irqs |= rise;
ih->stats[irq] ++; ih->stats[irq] += !!rise;
} else { } else {
rise = ih->sens_edge & ih->irqs & (1 << irq); rise = ih->sens_edge & ih->irqs & (1 << irq);
ih->irqs &= ~rise; ih->irqs &= ~rise;