mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] genirq: update irq stats from NMI handlers
@ 2019-07-04  4:22 Shijith Thotton
  2019-07-04  7:13 ` Julien Thierry
  2019-07-05  7:56 ` [PATCH v2] " Shijith Thotton
  0 siblings, 2 replies; 7+ messages in thread
From: Shijith Thotton @ 2019-07-04  4:22 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: Shijith Thotton, Thomas Gleixner, Julien Thierry,
	Catalin Marinas, Will Deacon, Jayachandran Chandrasekharan Nair,
	Ganapatrao Kulkarni, Jan Glauber, Robert Richter

The NMI handlers handle_percpu_devid_fasteoi_nmi() and
handle_fasteoi_nmi() added by commit 2dcf1fbcad35 ("genirq: Provide NMI
handlers") do not update the interrupt counts. Due to that the NMI
interrupt count does not show up correctly in /proc/interrupts.

Update the functions to fix this. With this change, we can see stats of
the perf NMI interrupts on arm64.

Fixes: 2dcf1fbcad35 ("genirq: Provide NMI handlers")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 kernel/irq/chip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 29d6c7d070b4..88d1e054c6ea 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -748,6 +748,8 @@ void handle_fasteoi_nmi(struct irq_desc *desc)
 	unsigned int irq = irq_desc_get_irq(desc);
 	irqreturn_t res;
 
+	kstat_incr_irqs_this_cpu(desc);
+
 	trace_irq_handler_entry(irq, action);
 	/*
 	 * NMIs cannot be shared, there is only one action.
@@ -962,6 +964,8 @@ void handle_percpu_devid_fasteoi_nmi(struct irq_desc *desc)
 	unsigned int irq = irq_desc_get_irq(desc);
 	irqreturn_t res;
 
+	__kstat_incr_irqs_this_cpu(desc);
+
 	trace_irq_handler_entry(irq, action);
 	res = action->handler(irq, raw_cpu_ptr(action->percpu_dev_id));
 	trace_irq_handler_exit(irq, action, res);
-- 
2.17.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-07-06  8:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04  4:22 [PATCH] genirq: update irq stats from NMI handlers Shijith Thotton
2019-07-04  7:13 ` Julien Thierry
2019-07-04 10:36   ` Shijith Thotton
2019-07-04 16:19     ` Thomas Gleixner
2019-07-04 16:31       ` Shijith Thotton
2019-07-05  7:56 ` [PATCH v2] " Shijith Thotton
2019-07-06  8:43   ` [tip:irq/core] genirq: Update " tip-bot for Shijith Thotton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome