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

[Xen-changelog] [xen-unstable] xen/arm: drain all the outstanding interrupts before returning from gic_interrupt


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 19 Feb 2013 15:22:27 +0000
  • Delivery-date: Tue, 19 Feb 2013 15:22:35 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1360935145 0
# Node ID 16857a81054736fb24e4b856bf3928f128445a01
# Parent  85e3db856360df41058b1bd373f7063d26752a73
xen/arm: drain all the outstanding interrupts before returning from 
gic_interrupt

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 85e3db856360 -r 16857a810547 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c        Fri Feb 15 13:32:24 2013 +0000
+++ b/xen/arch/arm/gic.c        Fri Feb 15 13:32:25 2013 +0000
@@ -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();
 
-    do_IRQ(regs, irq, is_fiq);
+        if (likely(irq < 1021))
+            do_IRQ(regs, irq, is_fiq);
+        else
+            break;
+
+        local_irq_disable();
+    } while (1);
 }
 
 int gicv_setup(struct domain *d)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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