Skip to contentSkip to conversation

xen/arm: drain all the outstanding interrupts before returning from gic_interrupt

PATCH In review Stefano Stabellini 1 participant 1 message Feb 14, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 4/7 xen/arm: drain all the outstanding interrupts before returning from gic_interrupt

---
 xen/arch/arm/gic.c |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)
xen/arch/arm/gic.c +13 -7
index ff186d2..1c8219d 100644
@@ -592,16 +592,22 @@ out:
 /* Accept an interrupt from the GIC and dispatch its handler */
 void gic_interrupt(struct cpu_user_regs *regs, int is_fiq)
 {
-    uint32_t intack = GICC[GICC_IAR];
-    unsigned int irq = intack & GICC_IA_IRQ;
+    uint32_t intack;
+    unsigned int irq;
 
-    local_irq_enable();
 
-    if ( irq == 1023 )
-        /* Spurious interrupt */
-        return;
+    do  {
+        intack = GICC[GICC_IAR];
+        irq = intack & GICC_IA_IRQ;
+        local_irq_enable();
+
+        if (likely(irq < 1021))
+            do_IRQ(regs, irq, is_fiq);
+        else
+            break;
 
-    do_IRQ(regs, irq, is_fiq);
+        local_irq_disable();
+    } while (1);
 }
 
 int gicv_setup(struct domain *d)
Signature · 1 line
1.7.2.5