diff options
author | Anton Blanchard <anton@samba.org> | 2005-09-06 14:52:12 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-06 16:09:21 +1000 |
commit | a6908cd00036080fbea14ff67335e5f2a1ab5489 (patch) | |
tree | 8ec2f5c877d9f1392184cfd31921cab7a5392c4b /arch/ppc64/oprofile/common.c | |
parent | 8530935d384bef1467ba76e1f4382f0f8b3c899d (diff) | |
download | kernel_samsung_aries-a6908cd00036080fbea14ff67335e5f2a1ab5489.zip kernel_samsung_aries-a6908cd00036080fbea14ff67335e5f2a1ab5489.tar.gz kernel_samsung_aries-a6908cd00036080fbea14ff67335e5f2a1ab5489.tar.bz2 |
[PATCH] ppc64: Use num_pmcs in oprofile code
Change oprofile to use num_pmcs from the cpu feature struct.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/oprofile/common.c')
-rw-r--r-- | arch/ppc64/oprofile/common.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c index 4acd1a4..a376eb2 100644 --- a/arch/ppc64/oprofile/common.c +++ b/arch/ppc64/oprofile/common.c @@ -16,6 +16,7 @@ #include <asm/ptrace.h> #include <asm/system.h> #include <asm/pmc.h> +#include <asm/cputable.h> #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; |