Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / kernel / irq / handle.c
index 2fb0e46..51df337 100644 (file)
@@ -30,6 +30,7 @@
  */
 irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
        [0 ... NR_IRQS-1] = {
+               .status = IRQ_DISABLED,
                .handler = &no_irq_type,
                .lock = SPIN_LOCK_UNLOCKED
        }
@@ -110,22 +111,22 @@ fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
        unsigned int status;
 
        kstat_this_cpu.irqs[irq]++;
-       if (desc->status & IRQ_PER_CPU) {
+       if (CHECK_IRQ_PER_CPU(desc->status)) {
                irqreturn_t action_ret;
 
                /*
                 * No locking required for CPU-local interrupts:
                 */
-               desc->handler->ack(irq);
+               if (desc->handler->ack)
+                       desc->handler->ack(irq);
                action_ret = handle_IRQ_event(irq, regs, desc->action);
-               if (!noirqdebug)
-                       note_interrupt(irq, desc, action_ret);
                desc->handler->end(irq);
                return 1;
        }
 
        spin_lock(&desc->lock);
-       desc->handler->ack(irq);
+       if (desc->handler->ack)
+               desc->handler->ack(irq);
        /*
         * REPLAY is when Linux resends an IRQ that was dropped earlier
         * WAITING is used by probe to mark irqs that are being tested
@@ -173,7 +174,7 @@ fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
 
                spin_lock(&desc->lock);
                if (!noirqdebug)
-                       note_interrupt(irq, desc, action_ret);
+                       note_interrupt(irq, desc, action_ret, regs);
                if (likely(!(desc->status & IRQ_PENDING)))
                        break;
                desc->status &= ~IRQ_PENDING;