diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-07-31 01:42:29 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-07-31 01:42:29 +0000 |
commit | cfa0b71dd84977b9378a9100b759739ef9220ac6 (patch) | |
tree | 6cf037fcbd9ab01b734805ad1357d6f66ae51202 /hw | |
parent | 724d3a8f2932f90e3527752f4b59f3607ceeb863 (diff) |
Fix OMAP pic handling of simultaneous interrupts.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3095 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/omap.c | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -70,16 +70,20 @@ struct omap_intr_handler_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 fiq = s->new_fiq_agr & s->irqs & ~s->mask & s->fiq; + uint32_t irq = 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 (irq) - s->new_irq_agr = 0; + if (s->new_irq_agr || !irq) { + qemu_set_irq(s->parent_pic[ARM_PIC_CPU_IRQ], irq); + if (irq) + s->new_irq_agr = 0; + } - qemu_set_irq(s->parent_pic[ARM_PIC_CPU_FIQ], fiq); - if (fiq) - s->new_fiq_agr = 0; + if (s->new_fiq_agr || !irq) { + qemu_set_irq(s->parent_pic[ARM_PIC_CPU_FIQ], fiq); + if (fiq) + s->new_fiq_agr = 0; + } } 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) { rise = ~ih->irqs & (1 << irq); ih->irqs |= rise; - ih->stats[irq] ++; + ih->stats[irq] += !!rise; } else { rise = ih->sens_edge & ih->irqs & (1 << irq); ih->irqs &= ~rise; |