]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/irq/resend.c
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
[mirror_ubuntu-bionic-kernel.git] / kernel / irq / resend.c
index 891115a929aa1dfe223b01c5f50efbc0ec35a2f7..ad683a99b1ec434681892a4a37bf9bcb67cc9763 100644 (file)
@@ -23,7 +23,7 @@
 #ifdef CONFIG_HARDIRQS_SW_RESEND
 
 /* Bitmap to handle software resend of interrupts: */
-static DECLARE_BITMAP(irqs_resend, NR_IRQS);
+static DECLARE_BITMAP(irqs_resend, IRQ_BITMAP_BITS);
 
 /*
  * Run software resends of IRQ's
@@ -55,20 +55,19 @@ static DECLARE_TASKLET(resend_tasklet, resend_irqs, 0);
  */
 void check_irq_resend(struct irq_desc *desc, unsigned int irq)
 {
-       unsigned int status = desc->status;
-
-       /*
-        * Make sure the interrupt is enabled, before resending it:
-        */
-       desc->irq_data.chip->irq_enable(&desc->irq_data);
-
        /*
         * We do not resend level type interrupts. Level type
         * interrupts are resent by hardware when they are still
         * active.
         */
-       if ((status & (IRQ_LEVEL | IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
-               desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY;
+       if (irq_settings_is_level(desc))
+               return;
+       if (desc->istate & IRQS_REPLAY)
+               return;
+       if (desc->istate & IRQS_PENDING) {
+               irq_compat_clr_pending(desc);
+               desc->istate &= ~IRQS_PENDING;
+               desc->istate |= IRQS_REPLAY;
 
                if (!desc->irq_data.chip->irq_retrigger ||
                    !desc->irq_data.chip->irq_retrigger(&desc->irq_data)) {