Commit ca41ad43 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc: Add irq accounting for system reset interrupts

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 75eb767e
...@@ -12,6 +12,7 @@ typedef struct { ...@@ -12,6 +12,7 @@ typedef struct {
unsigned int mce_exceptions; unsigned int mce_exceptions;
unsigned int spurious_irqs; unsigned int spurious_irqs;
unsigned int hmi_exceptions; unsigned int hmi_exceptions;
unsigned int sreset_irqs;
#ifdef CONFIG_PPC_DOORBELL #ifdef CONFIG_PPC_DOORBELL
unsigned int doorbell_irqs; unsigned int doorbell_irqs;
#endif #endif
......
...@@ -470,6 +470,11 @@ int arch_show_interrupts(struct seq_file *p, int prec) ...@@ -470,6 +470,11 @@ int arch_show_interrupts(struct seq_file *p, int prec)
seq_printf(p, " Hypervisor Maintenance Interrupts\n"); seq_printf(p, " Hypervisor Maintenance Interrupts\n");
} }
seq_printf(p, "%*s: ", prec, "NMI");
for_each_online_cpu(j)
seq_printf(p, "%10u ", per_cpu(irq_stat, j).sreset_irqs);
seq_printf(p, " System Reset interrupts\n");
#ifdef CONFIG_PPC_DOORBELL #ifdef CONFIG_PPC_DOORBELL
if (cpu_has_feature(CPU_FTR_DBELL)) { if (cpu_has_feature(CPU_FTR_DBELL)) {
seq_printf(p, "%*s: ", prec, "DBL"); seq_printf(p, "%*s: ", prec, "DBL");
...@@ -494,6 +499,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) ...@@ -494,6 +499,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
sum += per_cpu(irq_stat, cpu).spurious_irqs; sum += per_cpu(irq_stat, cpu).spurious_irqs;
sum += per_cpu(irq_stat, cpu).timer_irqs_others; sum += per_cpu(irq_stat, cpu).timer_irqs_others;
sum += per_cpu(irq_stat, cpu).hmi_exceptions; sum += per_cpu(irq_stat, cpu).hmi_exceptions;
sum += per_cpu(irq_stat, cpu).sreset_irqs;
#ifdef CONFIG_PPC_DOORBELL #ifdef CONFIG_PPC_DOORBELL
sum += per_cpu(irq_stat, cpu).doorbell_irqs; sum += per_cpu(irq_stat, cpu).doorbell_irqs;
#endif #endif
......
...@@ -288,6 +288,8 @@ void system_reset_exception(struct pt_regs *regs) ...@@ -288,6 +288,8 @@ void system_reset_exception(struct pt_regs *regs)
if (!nested) if (!nested)
nmi_enter(); nmi_enter();
__this_cpu_inc(irq_stat.sreset_irqs);
/* See if any machine dependent calls */ /* See if any machine dependent calls */
if (ppc_md.system_reset_exception) { if (ppc_md.system_reset_exception) {
if (ppc_md.system_reset_exception(regs)) if (ppc_md.system_reset_exception(regs))
......
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