From: Christophe Leroy Date: Thu, 16 Mar 2017 08:55:45 +0000 (+0100) Subject: powerpc: Handle simultaneous interrupts at once X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=45cb08f4791ce6a15c54598b4cb73db4b4b8294f;p=openwrt%2Fstaging%2Fblogic.git powerpc: Handle simultaneous interrupts at once It often happens to have simultaneous interrupts, for instance when having double Ethernet attachment. With the current implementation, we suffer the cost of kernel entry/exit for each interrupt. This patch introduces a loop in __do_irq() to handle all interrupts at once before returning. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 5c291df30fe3..ab2ed9afd3c2 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -481,7 +481,11 @@ void __do_irq(struct pt_regs *regs) if (unlikely(!irq)) __this_cpu_inc(irq_stat.spurious_irqs); else - generic_handle_irq(irq); + do { + generic_handle_irq(irq); + + irq = ppc_md.get_irq(); + } while (irq); trace_irq_exit(regs);