diff options
author | Anton Blanchard <anton@samba.org> | 2005-09-06 14:57:52 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-06 16:09:21 +1000 |
commit | 8fef0306f9164d4bfd0befb62e63e4d1167681b5 (patch) | |
tree | 55158562dbbe4a9e16f9f5e600c2b7fcee21d38b /arch/ppc64/oprofile/common.c | |
parent | dca859329cee9b4cf02c8b7cb805b49973292ed2 (diff) |
[PATCH] ppc64: Move oprofile_model into cpu feature struct
Move oprofile_model into 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 | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c index 3e8daabf102..e5f572710aa 100644 --- a/arch/ppc64/oprofile/common.c +++ b/arch/ppc64/oprofile/common.c @@ -121,45 +121,13 @@ static int op_ppc64_create_files(struct super_block *sb, struct dentry *root) int __init oprofile_arch_init(struct oprofile_operations *ops) { - unsigned int pvr; - - pvr = mfspr(SPRN_PVR); - - switch (PVR_VER(pvr)) { - case PV_630: - case PV_630p: - model = &op_model_rs64; - break; - - case PV_NORTHSTAR: - case PV_PULSAR: - case PV_ICESTAR: - case PV_SSTAR: - model = &op_model_rs64; - break; - - case PV_POWER4: - case PV_POWER4p: - model = &op_model_power4; - break; - - case PV_970: - case PV_970FX: - case PV_970MP: - model = &op_model_power4; - break; - - case PV_POWER5: - case PV_POWER5p: - model = &op_model_power4; - break; - - default: - return -ENODEV; - } + if (!cur_cpu_spec->oprofile_model || !cur_cpu_spec->oprofile_cpu_type) + return -ENODEV; - ops->cpu_type = cur_cpu_spec->oprofile_cpu_type; + model = cur_cpu_spec->oprofile_model; model->num_counters = cur_cpu_spec->num_pmcs; + + ops->cpu_type = cur_cpu_spec->oprofile_cpu_type; ops->create_files = op_ppc64_create_files; ops->setup = op_ppc64_setup; ops->shutdown = op_ppc64_shutdown; |