Don't call a NULL ack function in the generic IRQ code.
authorPaul Mackerras <paulus@samba.org>
Wed, 28 Sep 2005 10:29:44 +0000 (20:29 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 28 Sep 2005 10:29:44 +0000 (20:29 +1000)
Some IRQ controllers don't need an ack function (e.g. OpenPIC on
PPC platforms) and for them we'd rather not have the overhead
of doing an indirect call to a function that does nothing.

Signed-off-by: Paul Mackerras <paulus@samba.org>
kernel/irq/handle.c

index 3ff7b925c38773f1c0df8eb4dcda1ea5926f1ea3..51df337b37db860b1141683d6fa0a01f6300ac0d 100644 (file)
@@ -117,14 +117,16 @@ fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
                /*
                 * 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);
                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