Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>

authored by

Robin Getz and committed by
Bryan Wu
3605fb09 0be58939

+8 -1
+1
arch/blackfin/include/asm/pda.h
··· 59 59 unsigned long icplb_fault_addr; 60 60 unsigned long retx; 61 61 unsigned long seqstat; 62 + unsigned int __nmi_count; /* number of times NMI asserted on this CPU */ 62 63 }; 63 64 64 65 extern struct blackfin_pda cpu_pda[];
+7 -1
arch/blackfin/kernel/irqchip.c
··· 35 35 #include <linux/interrupt.h> 36 36 #include <linux/irq.h> 37 37 #include <asm/trace.h> 38 + #include <asm/pda.h> 38 39 39 40 static atomic_t irq_err_count; 40 41 static spinlock_t irq_controller_lock; ··· 92 91 seq_putc(p, '\n'); 93 92 skip: 94 93 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 95 - } else if (i == NR_IRQS) 94 + } else if (i == NR_IRQS) { 95 + seq_printf(p, "NMI: "); 96 + for_each_online_cpu(j) 97 + seq_printf(p, "%10u ", cpu_pda[j].__nmi_count); 98 + seq_printf(p, " CORE Non Maskable Interrupt\n"); 96 99 seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); 100 + } 97 101 return 0; 98 102 } 99 103