powerpc: Handle simultaneous interrupts at once
authorChristophe Leroy <christophe.leroy@c-s.fr>
Thu, 16 Mar 2017 08:55:45 +0000 (09:55 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Jun 2017 09:20:44 +0000 (19:20 +1000)
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 <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/irq.c

index 5c291df30fe34328d64b7bc0985843a7d9dfe73a..ab2ed9afd3c23f8c121c30c906c22ed7365c9f29 100644 (file)
@@ -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);