diff options
author | David S. Miller <davem@davemloft.net> | 2009-09-10 15:28:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-10 15:28:20 +0200 |
commit | 59abbd1e7cfd6018fb8e58a96aa562aaff8711e7 (patch) | |
tree | 18114674792b9b79fff35b69bab7eea6a20fcf00 /arch/sparc/kernel/nmi.c | |
parent | sparc64: Implement a real set_perf_counter_pending(). (diff) | |
download | linux-59abbd1e7cfd6018fb8e58a96aa562aaff8711e7.tar.xz linux-59abbd1e7cfd6018fb8e58a96aa562aaff8711e7.zip |
sparc64: Initial hw perf counter support.
Only supports one simple counter and only UltraSPARC-IIIi chips.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/nmi.c')
-rw-r--r-- | arch/sparc/kernel/nmi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index 7de19dd30f40..391a6ed9a184 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c @@ -19,6 +19,7 @@ #include <linux/delay.h> #include <linux/smp.h> +#include <asm/perf_counter.h> #include <asm/ptrace.h> #include <asm/local.h> #include <asm/pcr.h> @@ -156,7 +157,7 @@ static void report_broken_nmi(int cpu, int *prev_nmi_count) atomic_dec(&nmi_active); } -static void stop_nmi_watchdog(void *unused) +void stop_nmi_watchdog(void *unused) { pcr_ops->write(PCR_PIC_PRIV); __get_cpu_var(wd_enabled) = 0; @@ -210,7 +211,7 @@ error: return err; } -static void start_nmi_watchdog(void *unused) +void start_nmi_watchdog(void *unused) { __get_cpu_var(wd_enabled) = 1; atomic_inc(&nmi_active); @@ -263,6 +264,9 @@ int __init nmi_init(void) atomic_set(&nmi_active, -1); } } + if (!err) + init_hw_perf_counters(); + return err; } |