summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/nmi.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-09-10 17:28:20 +0400
committerDavid S. Miller <davem@davemloft.net>2009-09-10 17:28:20 +0400
commit59abbd1e7cfd6018fb8e58a96aa562aaff8711e7 (patch)
tree18114674792b9b79fff35b69bab7eea6a20fcf00 /arch/sparc/kernel/nmi.c
parent5686f9c3d67d5a20108fa26105c98b042df13123 (diff)
downloadlinux-59abbd1e7cfd6018fb8e58a96aa562aaff8711e7.tar.xz
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.c8
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;
}