aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/perf/power5-pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/perf/power5-pmu.c')
-rw-r--r--arch/powerpc/perf/power5-pmu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/perf/power5-pmu.c b/arch/powerpc/perf/power5-pmu.c
index 1f83c4cba0aa..c6aefd0a1cc8 100644
--- a/arch/powerpc/perf/power5-pmu.c
+++ b/arch/powerpc/perf/power5-pmu.c
@@ -620,8 +620,9 @@ static struct power_pmu power5_pmu = {
int __init init_power5_pmu(void)
{
- if (!cur_cpu_spec->oprofile_cpu_type ||
- strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5"))
+ unsigned int pvr = mfspr(SPRN_PVR);
+
+ if (PVR_VER(pvr) != PVR_POWER5)
return -ENODEV;
return register_power_pmu(&power5_pmu);