[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 4/7] xen/arm: drain all the outstanding interrupts before returning from gic_interrupt



Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 xen/arch/arm/gic.c |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index ff186d2..1c8219d 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -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)
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.