diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-10-14 03:42:28 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-14 03:42:28 -0400 |
commit | 731ba3301de41d2ffae9dd3e0f85f7361d8ad8f4 (patch) | |
tree | fa41931b1bfc7b24e569ab0659460241c4c54b18 /arch/sh/kernel | |
parent | 56bfc42f6cba3e831094c01a23fbbb17a20bbdf8 (diff) |
sh: Count NMIs in irq_cpustat_t.
This plugs in support for NMI counting per-CPU via irq_cpustat_t.
Modelled after the x86 implementation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/irq.c | 8 | ||||
-rw-r--r-- | arch/sh/kernel/traps.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 7cb933ba4957..11c289ecc090 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -36,7 +36,15 @@ void ack_bad_irq(unsigned int irq) | |||
36 | */ | 36 | */ |
37 | static int show_other_interrupts(struct seq_file *p, int prec) | 37 | static int show_other_interrupts(struct seq_file *p, int prec) |
38 | { | 38 | { |
39 | int j; | ||
40 | |||
41 | seq_printf(p, "%*s: ", prec, "NMI"); | ||
42 | for_each_online_cpu(j) | ||
43 | seq_printf(p, "%10u ", irq_stat[j].__nmi_count); | ||
44 | seq_printf(p, " Non-maskable interrupts\n"); | ||
45 | |||
39 | seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); | 46 | seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); |
47 | |||
40 | return 0; | 48 | return 0; |
41 | } | 49 | } |
42 | 50 | ||
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index a8396f36bd14..d52695df2702 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c | |||
@@ -95,9 +95,11 @@ BUILD_TRAP_HANDLER(bug) | |||
95 | 95 | ||
96 | BUILD_TRAP_HANDLER(nmi) | 96 | BUILD_TRAP_HANDLER(nmi) |
97 | { | 97 | { |
98 | unsigned int cpu = smp_processor_id(); | ||
98 | TRAP_HANDLER_DECL; | 99 | TRAP_HANDLER_DECL; |
99 | 100 | ||
100 | nmi_enter(); | 101 | nmi_enter(); |
102 | nmi_count(cpu)++; | ||
101 | 103 | ||
102 | switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) { | 104 | switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) { |
103 | case NOTIFY_OK: | 105 | case NOTIFY_OK: |