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

sparc64: Use a seperate counter for timer interrupts and NMI checks, like x86.

This keeps us from having to use kstat_irqs_cpu() from the NMI handler,
the former of which is a profiled function.

Instead we use a currently empty slot in the cpu_data

Signed-off-by: David S. Miller <davem@davemloft.net>

+3 -3
+1 -1
arch/sparc/include/asm/cpudata_64.h
··· 17 17 unsigned int __nmi_count; 18 18 unsigned long clock_tick; /* %tick's per second */ 19 19 unsigned long __pad; 20 - unsigned int __pad1; 20 + unsigned int irq0_irqs; 21 21 unsigned int __pad2; 22 22 23 23 /* Dcache line 2, rarely used */
+1 -2
arch/sparc/kernel/nmi.c
··· 92 92 notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) 93 93 { 94 94 unsigned int sum, touched = 0; 95 - int cpu = smp_processor_id(); 96 95 97 96 clear_softint(1 << irq); 98 97 ··· 105 106 else 106 107 pcr_ops->write(PCR_PIC_PRIV); 107 108 108 - sum = kstat_irqs_cpu(0, cpu); 109 + sum = local_cpu_data().irq0_irqs; 109 110 if (__get_cpu_var(nmi_touch)) { 110 111 __get_cpu_var(nmi_touch) = 0; 111 112 touched = 1;
+1
arch/sparc/kernel/time_64.c
··· 728 728 729 729 irq_enter(); 730 730 731 + local_cpu_data().irq0_irqs++; 731 732 kstat_incr_irqs_this_cpu(0, irq_to_desc(0)); 732 733 733 734 if (unlikely(!evt->event_handler)) {