From: David Howells Permit __do_IRQ() to be dispensed with based on a configuration option. Signed-off-by: David Howells Cc: Benjamin Herrenschmidt Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton --- arch/frv/Kconfig | 4 ++++ include/linux/irq.h | 6 ++++++ kernel/irq/handle.c | 2 ++ 3 files changed, 12 insertions(+) diff -puN arch/frv/Kconfig~frv-permit-__do_irq-to-be-dispensed-with arch/frv/Kconfig --- a/arch/frv/Kconfig~frv-permit-__do_irq-to-be-dispensed-with +++ a/arch/frv/Kconfig @@ -29,6 +29,10 @@ config GENERIC_HARDIRQS bool default y +config GENERIC_HARDIRQS_NO__DO_IRQ + bool + default y + config GENERIC_TIME bool default y diff -puN include/linux/irq.h~frv-permit-__do_irq-to-be-dispensed-with include/linux/irq.h --- a/include/linux/irq.h~frv-permit-__do_irq-to-be-dispensed-with +++ a/include/linux/irq.h @@ -321,7 +321,9 @@ handle_irq_name(void fastcall (*handle)( * Monolithic do_IRQ implementation. * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) */ +#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); +#endif /* * Architectures call this to let the generic IRQ layer @@ -333,10 +335,14 @@ static inline void generic_handle_irq(un { struct irq_desc *desc = irq_desc + irq; +#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ + desc->handle_irq(irq, desc, regs); +#else if (likely(desc->handle_irq)) desc->handle_irq(irq, desc, regs); else __do_IRQ(irq, regs); +#endif } /* Handling of unhandled and spurious interrupts: */ diff -puN kernel/irq/handle.c~frv-permit-__do_irq-to-be-dispensed-with kernel/irq/handle.c --- a/kernel/irq/handle.c~frv-permit-__do_irq-to-be-dispensed-with +++ a/kernel/irq/handle.c @@ -154,6 +154,7 @@ irqreturn_t handle_IRQ_event(unsigned in return retval; } +#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ /** * __do_IRQ - original all in one highlevel IRQ handler * @irq: the interrupt number @@ -253,6 +254,7 @@ out: return 1; } +#endif #ifdef CONFIG_TRACE_IRQFLAGS _