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

sh: Get rid of nmi_count()

nmi_count() is a historical leftover and SH is the only user. Replace it
with regular per cpu accessors.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20201113141732.844232404@linutronix.de

+2 -2
+1 -1
arch/sh/kernel/irq.c
··· 44 44 45 45 seq_printf(p, "%*s: ", prec, "NMI"); 46 46 for_each_online_cpu(j) 47 - seq_printf(p, "%10u ", nmi_count(j)); 47 + seq_printf(p, "%10u ", per_cpu(irq_stat.__nmi_count, j); 48 48 seq_printf(p, " Non-maskable interrupts\n"); 49 49 50 50 seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
+1 -1
arch/sh/kernel/traps.c
··· 186 186 arch_ftrace_nmi_enter(); 187 187 188 188 nmi_enter(); 189 - nmi_count(cpu)++; 189 + this_cpu_inc(irq_stat.__nmi_count); 190 190 191 191 switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) { 192 192 case NOTIFY_OK: