aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2014-12-10 15:34:39 +0000
committerDaniel Thompson <daniel.thompson@linaro.org>2015-01-13 15:38:46 +0000
commitf6190b863f77c3c9ff4e1acc54e56736831d5267 (patch)
treeec20f4cf6882b1c570d6b3fb1d3ec01b6656159a
parent50316b4218af5b6fbe68a6478613b42258c1b491 (diff)
arm: irq: Add a __nmi_count stat
Extends the irq statistics for ARM, making it possible to quickly observe how many times the default FIQ handler has executed. In /proc/interrupts we use the NMI terminology (rather than FIQ) because the statistic is only likely to be updated when we run the default FIQ handler (handle_fiq_as_nmi). Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rw-r--r--arch/arm/include/asm/hardirq.h1
-rw-r--r--arch/arm/kernel/irq.c7
-rw-r--r--arch/arm/kernel/traps.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h
index 5df33e30ae1b..27ab43b5d7e2 100644
--- a/arch/arm/include/asm/hardirq.h
+++ b/arch/arm/include/asm/hardirq.h
@@ -9,6 +9,7 @@
typedef struct {
unsigned int __softirq_pending;
+ unsigned int __nmi_count;
#ifdef CONFIG_SMP
unsigned int ipi_irqs[NR_IPI];
#endif
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index ad857bada96c..6dd1619e0700 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -48,13 +48,18 @@ unsigned long irq_err_count;
int arch_show_interrupts(struct seq_file *p, int prec)
{
+ int i;
+
#ifdef CONFIG_FIQ
show_fiq_list(p, prec);
#endif
#ifdef CONFIG_SMP
show_ipi_list(p, prec);
#endif
- seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count);
+ seq_printf(p, "%*s: ", prec, "NMI");
+ for_each_online_cpu(i)
+ seq_printf(p, "%10u ", __get_irq_stat(i, __nmi_count));
+ seq_printf(p, "\n%*s: %10lu\n", prec, "Err", irq_err_count);
return 0;
}
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 1836415b8a5c..5645f81ac4cc 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -476,8 +476,10 @@ die_sig:
*/
asmlinkage void __exception_irq_entry handle_fiq_as_nmi(struct pt_regs *regs)
{
+ unsigned int cpu = smp_processor_id();
struct pt_regs *old_regs = set_irq_regs(regs);
+ __inc_irq_stat(cpu, __nmi_count);
nmi_enter();
#ifdef CONFIG_ARM_GIC