aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ppc970-pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/ppc970-pmu.c')
-rw-r--r--arch/powerpc/kernel/ppc970-pmu.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/ppc970-pmu.c b/arch/powerpc/kernel/ppc970-pmu.c
index 3ed88333412f..6637c87fe70e 100644
--- a/arch/powerpc/kernel/ppc970-pmu.c
+++ b/arch/powerpc/kernel/ppc970-pmu.c
@@ -10,7 +10,9 @@
10 */ 10 */
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/perf_counter.h> 12#include <linux/perf_counter.h>
13#include <linux/string.h>
13#include <asm/reg.h> 14#include <asm/reg.h>
15#include <asm/cputable.h>
14 16
15/* 17/*
16 * Bits in event code for PPC970 18 * Bits in event code for PPC970
@@ -470,7 +472,8 @@ static int ppc970_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
470 }, 472 },
471}; 473};
472 474
473struct power_pmu ppc970_pmu = { 475static struct power_pmu ppc970_pmu = {
476 .name = "PPC970/FX/MP",
474 .n_counter = 8, 477 .n_counter = 8,
475 .max_alternatives = 2, 478 .max_alternatives = 2,
476 .add_fields = 0x001100005555ull, 479 .add_fields = 0x001100005555ull,
@@ -483,3 +486,14 @@ struct power_pmu ppc970_pmu = {
483 .generic_events = ppc970_generic_events, 486 .generic_events = ppc970_generic_events,
484 .cache_events = &ppc970_cache_events, 487 .cache_events = &ppc970_cache_events,
485}; 488};
489
490static int init_ppc970_pmu(void)
491{
492 if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
493 && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP"))
494 return -ENODEV;
495
496 return register_power_pmu(&ppc970_pmu);
497}
498
499arch_initcall(init_ppc970_pmu);