Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602099 > unrolled thread

[PATCH v2] powerpc: handle simultaneous interrupts at once

Started byChristophe Leroy <christophe.leroy@c-s.fr>
First post2017-03-16 10:00 +0100
Last post2017-03-16 10:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] powerpc: handle simultaneous interrupts at once Christophe Leroy <christophe.leroy@c-s.fr> - 2017-03-16 10:00 +0100

#1602099 — [PATCH v2] powerpc: handle simultaneous interrupts at once

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-03-16 10:00 +0100
Subject[PATCH v2] powerpc: handle simultaneous interrupts at once
Message-ID<tlzqi-4aX-9@gated-at.bofh.it>
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>
---
Changed from v1(RFC): simplified following remark from benh

 arch/powerpc/kernel/irq.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index a018f5cae899..ba0cb6c2ee7d 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -522,7 +522,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);
 
-- 
2.12.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web