aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/oprofile/common.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-09-06 00:52:12 -0400
committerPaul Mackerras <paulus@samba.org>2005-09-06 02:09:21 -0400
commita6908cd00036080fbea14ff67335e5f2a1ab5489 (patch)
tree8ec2f5c877d9f1392184cfd31921cab7a5392c4b /arch/ppc64/oprofile/common.c
parent8530935d384bef1467ba76e1f4382f0f8b3c899d (diff)
[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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c
index 4acd1a42493..a376eb2a1f0 100644
--- a/arch/ppc64/oprofile/common.c
+++ b/arch/ppc64/oprofile/common.c
@@ -16,6 +16,7 @@
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17#include <asm/system.h> 17#include <asm/system.h>
18#include <asm/pmc.h> 18#include <asm/pmc.h>
19#include <asm/cputable.h>
19 20
20#include "op_impl.h" 21#include "op_impl.h"
21 22
@@ -131,7 +132,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
131 case PV_630: 132 case PV_630:
132 case PV_630p: 133 case PV_630p:
133 model = &op_model_rs64; 134 model = &op_model_rs64;
134 model->num_counters = 8;
135 ops->cpu_type = "ppc64/power3"; 135 ops->cpu_type = "ppc64/power3";
136 break; 136 break;
137 137
@@ -140,14 +140,12 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
140 case PV_ICESTAR: 140 case PV_ICESTAR:
141 case PV_SSTAR: 141 case PV_SSTAR:
142 model = &op_model_rs64; 142 model = &op_model_rs64;
143 model->num_counters = 8;
144 ops->cpu_type = "ppc64/rs64"; 143 ops->cpu_type = "ppc64/rs64";
145 break; 144 break;
146 145
147 case PV_POWER4: 146 case PV_POWER4:
148 case PV_POWER4p: 147 case PV_POWER4p:
149 model = &op_model_power4; 148 model = &op_model_power4;
150 model->num_counters = 8;
151 ops->cpu_type = "ppc64/power4"; 149 ops->cpu_type = "ppc64/power4";
152 break; 150 break;
153 151
@@ -155,14 +153,12 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
155 case PV_970FX: 153 case PV_970FX:
156 case PV_970MP: 154 case PV_970MP:
157 model = &op_model_power4; 155 model = &op_model_power4;
158 model->num_counters = 8;
159 ops->cpu_type = "ppc64/970"; 156 ops->cpu_type = "ppc64/970";
160 break; 157 break;
161 158
162 case PV_POWER5: 159 case PV_POWER5:
163 case PV_POWER5p: 160 case PV_POWER5p:
164 model = &op_model_power4; 161 model = &op_model_power4;
165 model->num_counters = 6;
166 ops->cpu_type = "ppc64/power5"; 162 ops->cpu_type = "ppc64/power5";
167 break; 163 break;
168 164
@@ -170,6 +166,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
170 return -ENODEV; 166 return -ENODEV;
171 } 167 }
172 168
169 model->num_counters = cur_cpu_spec->num_pmcs;
173 ops->create_files = op_ppc64_create_files; 170 ops->create_files = op_ppc64_create_files;
174 ops->setup = op_ppc64_setup; 171 ops->setup = op_ppc64_setup;
175 ops->shutdown = op_ppc64_shutdown; 172 ops->shutdown = op_ppc64_shutdown;