]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/irq/handle.c
[ARM] 4679/1: AT91: Change maintainer email address
[linux-2.6-omap-h63xx.git] / kernel / irq / handle.c
index 42aa6f1a3f0f95e7dce8be2480ab5d209c881db3..dc335ad27525f0019d475124322779d6c6ed5f09 100644 (file)
@@ -22,7 +22,6 @@
  * handle_bad_irq - handle spurious and unhandled irqs
  * @irq:       the interrupt number
  * @desc:      description of the interrupt
- * @regs:      pointer to a register structure
  *
  * Handles spurious and unhandled IRQ's. It also prints a debugmessage.
  */
@@ -48,13 +47,13 @@ handle_bad_irq(unsigned int irq, struct irq_desc *desc)
  *
  * Controller mappings for all interrupt sources:
  */
-struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = {
+struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
        [0 ... NR_IRQS-1] = {
                .status = IRQ_DISABLED,
                .chip = &no_irq_chip,
                .handle_irq = handle_bad_irq,
                .depth = 1,
-               .lock = SPIN_LOCK_UNLOCKED,
+               .lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock),
 #ifdef CONFIG_SMP
                .affinity = CPU_MASK_ALL
 #endif
@@ -179,7 +178,11 @@ fastcall unsigned int __do_IRQ(unsigned int irq)
                 */
                if (desc->chip->ack)
                        desc->chip->ack(irq);
-               action_ret = handle_IRQ_event(irq, desc->action);
+               if (likely(!(desc->status & IRQ_DISABLED))) {
+                       action_ret = handle_IRQ_event(irq, desc->action);
+                       if (!noirqdebug)
+                               note_interrupt(irq, desc, action_ret);
+               }
                desc->chip->end(irq);
                return 1;
        }
@@ -231,10 +234,10 @@ fastcall unsigned int __do_IRQ(unsigned int irq)
                spin_unlock(&desc->lock);
 
                action_ret = handle_IRQ_event(irq, action);
-
-               spin_lock(&desc->lock);
                if (!noirqdebug)
                        note_interrupt(irq, desc, action_ret);
+
+               spin_lock(&desc->lock);
                if (likely(!(desc->status & IRQ_PENDING)))
                        break;
                desc->status &= ~IRQ_PENDING;