From a6908cd00036080fbea14ff67335e5f2a1ab5489 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 6 Sep 2005 14:52:12 +1000 Subject: [PATCH] ppc64: Use num_pmcs in oprofile code Change oprofile to use num_pmcs from the cpu feature struct. Signed-off-by: Anton Blanchard Signed-off-by: Paul Mackerras --- arch/ppc64/oprofile/common.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'arch/ppc64/oprofile/common.c') diff --git a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c index 4acd1a424933..a376eb2a1f0f 100644 --- a/arch/ppc64/oprofile/common.c +++ b/arch/ppc64/oprofile/common.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "op_impl.h" @@ -131,7 +132,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) case PV_630: case PV_630p: model = &op_model_rs64; - model->num_counters = 8; ops->cpu_type = "ppc64/power3"; break; @@ -140,14 +140,12 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) case PV_ICESTAR: case PV_SSTAR: model = &op_model_rs64; - model->num_counters = 8; ops->cpu_type = "ppc64/rs64"; break; case PV_POWER4: case PV_POWER4p: model = &op_model_power4; - model->num_counters = 8; ops->cpu_type = "ppc64/power4"; break; @@ -155,14 +153,12 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) case PV_970FX: case PV_970MP: model = &op_model_power4; - model->num_counters = 8; ops->cpu_type = "ppc64/970"; break; case PV_POWER5: case PV_POWER5p: model = &op_model_power4; - model->num_counters = 6; ops->cpu_type = "ppc64/power5"; break; @@ -170,6 +166,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) return -ENODEV; } + model->num_counters = cur_cpu_spec->num_pmcs; ops->create_files = op_ppc64_create_files; ops->setup = op_ppc64_setup; ops->shutdown = op_ppc64_shutdown; -- cgit v1.2.2