Commit 3605fb09 authored by Robin Getz's avatar Robin Getz Committed by Bryan Wu

Blackfin arch: Add ability to count and display number of NMI interrupts

Signed-off-by: default avatarRobin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 0be58939
...@@ -59,6 +59,7 @@ struct blackfin_pda { /* Per-processor Data Area */ ...@@ -59,6 +59,7 @@ struct blackfin_pda { /* Per-processor Data Area */
unsigned long icplb_fault_addr; unsigned long icplb_fault_addr;
unsigned long retx; unsigned long retx;
unsigned long seqstat; unsigned long seqstat;
unsigned int __nmi_count; /* number of times NMI asserted on this CPU */
}; };
extern struct blackfin_pda cpu_pda[]; extern struct blackfin_pda cpu_pda[];
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <asm/trace.h> #include <asm/trace.h>
#include <asm/pda.h>
static atomic_t irq_err_count; static atomic_t irq_err_count;
static spinlock_t irq_controller_lock; static spinlock_t irq_controller_lock;
...@@ -91,8 +92,13 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -91,8 +92,13 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) } else if (i == NR_IRQS) {
seq_printf(p, "NMI: ");
for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
seq_printf(p, " CORE Non Maskable Interrupt\n");
seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count));
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment