aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-06 20:38:52 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-13 01:37:07 -0400
commitdaecbf58a509bc27c112647e825df763c3e3b0f4 (patch)
tree871f5dd9e18ff2f4c4ff88a004527a5b0e974f51 /arch/sparc
parentf8e8a8e8cba3359df2a16c17d59eedb08adf3b43 (diff)
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>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/cpudata_64.h2
-rw-r--r--arch/sparc/kernel/nmi.c3
-rw-r--r--arch/sparc/kernel/time_64.c1
3 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/cpudata_64.h b/arch/sparc/include/asm/cpudata_64.h
index 926397d345ff..050ef35b9dcf 100644
--- a/arch/sparc/include/asm/cpudata_64.h
+++ b/arch/sparc/include/asm/cpudata_64.h
@@ -17,7 +17,7 @@ typedef struct {
17 unsigned int __nmi_count; 17 unsigned int __nmi_count;
18 unsigned long clock_tick; /* %tick's per second */ 18 unsigned long clock_tick; /* %tick's per second */
19 unsigned long __pad; 19 unsigned long __pad;
20 unsigned int __pad1; 20 unsigned int irq0_irqs;
21 unsigned int __pad2; 21 unsigned int __pad2;
22 22
23 /* Dcache line 2, rarely used */ 23 /* Dcache line 2, rarely used */
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c
index b287b62c7ea3..75a3d1a25356 100644
--- a/arch/sparc/kernel/nmi.c
+++ b/arch/sparc/kernel/nmi.c
@@ -92,7 +92,6 @@ static void die_nmi(const char *str, struct pt_regs *regs, int do_panic)
92notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) 92notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
93{ 93{
94 unsigned int sum, touched = 0; 94 unsigned int sum, touched = 0;
95 int cpu = smp_processor_id();
96 95
97 clear_softint(1 << irq); 96 clear_softint(1 << irq);
98 97
@@ -106,7 +105,7 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
106 else 105 else
107 pcr_ops->write(PCR_PIC_PRIV); 106 pcr_ops->write(PCR_PIC_PRIV);
108 107
109 sum = kstat_irqs_cpu(0, cpu); 108 sum = local_cpu_data().irq0_irqs;
110 if (__get_cpu_var(nmi_touch)) { 109 if (__get_cpu_var(nmi_touch)) {
111 __get_cpu_var(nmi_touch) = 0; 110 __get_cpu_var(nmi_touch) = 0;
112 touched = 1; 111 touched = 1;
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index 67e165102885..f25858e442ab 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -728,6 +728,7 @@ void timer_interrupt(int irq, struct pt_regs *regs)
728 728
729 irq_enter(); 729 irq_enter();
730 730
731 local_cpu_data().irq0_irqs++;
731 kstat_incr_irqs_this_cpu(0, irq_to_desc(0)); 732 kstat_incr_irqs_this_cpu(0, irq_to_desc(0));
732 733
733 if (unlikely(!evt->event_handler)) { 734 if (unlikely(!evt->event_handler)) {