Commit cfa0b71d authored by balrog's avatar balrog
Browse files

Fix OMAP pic handling of simultaneous interrupts.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3095 c046a42c-6fe2-441c-8c8c-71466251a162
parent 724d3a8f
...@@ -70,16 +70,20 @@ struct omap_intr_handler_s { ...@@ -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) ...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment