]> err.no Git - linux-2.6/blobdiff - kernel/irq/chip.c
genirq: revert lazy irq disable for simple irqs
[linux-2.6] / kernel / irq / chip.c
index 0133f4f9e9f0c71633ccff2d4029f479148d0af9..44019ce30a14213991a73c61c852073d4d6c8112 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include <linux/irq.h>
+#include <linux/msi.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
@@ -185,6 +186,8 @@ int set_irq_msi(unsigned int irq, struct msi_desc *entry)
        desc = irq_desc + irq;
        spin_lock_irqsave(&desc->lock, flags);
        desc->msi_desc = entry;
+       if (entry)
+               entry->irq = irq;
        spin_unlock_irqrestore(&desc->lock, flags);
        return 0;
 }
@@ -294,18 +297,13 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
 
        if (unlikely(desc->status & IRQ_INPROGRESS))
                goto out_unlock;
+       desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
        kstat_cpu(cpu).irqs[irq]++;
 
        action = desc->action;
-       if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
-               if (desc->chip->mask)
-                       desc->chip->mask(irq);
-               desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
-               desc->status |= IRQ_PENDING;
+       if (unlikely(!action || (desc->status & IRQ_DISABLED)))
                goto out_unlock;
-       }
 
-       desc->status &= ~(IRQ_REPLAY | IRQ_WAITING | IRQ_PENDING);
        desc->status |= IRQ_INPROGRESS;
        spin_unlock(&desc->lock);
 
@@ -349,13 +347,10 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
         * keep it masked and get out of here
         */
        action = desc->action;
-       if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
-               desc->status |= IRQ_PENDING;
+       if (unlikely(!action || (desc->status & IRQ_DISABLED)))
                goto out_unlock;
-       }
 
        desc->status |= IRQ_INPROGRESS;
-       desc->status &= ~IRQ_PENDING;
        spin_unlock(&desc->lock);
 
        action_ret = handle_IRQ_event(irq, action);
@@ -503,7 +498,6 @@ out_unlock:
        spin_unlock(&desc->lock);
 }
 
-#ifdef CONFIG_SMP
 /**
  *     handle_percpu_IRQ - Per CPU local irq handler
  *     @irq:   the interrupt number
@@ -529,8 +523,6 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
                desc->chip->eoi(irq);
 }
 
-#endif /* CONFIG_SMP */
-
 void
 __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
                  const char *name)