19
19
#include <linux/init.h>
20
20
#include <linux/module.h>
21
21
22
+ #include <asm/oprofile_impl.h>
22
23
#include <asm/cputable.h>
23
24
24
25
struct cpu_spec * cur_cpu_spec = NULL ;
@@ -54,96 +55,134 @@ struct cpu_spec cpu_specs[] = {
54
55
.pvr_value = 0x00400000 ,
55
56
.cpu_name = "POWER3 (630)" ,
56
57
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
57
- CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
58
- CPU_FTR_PMC8 ,
58
+ CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR ,
59
59
.cpu_user_features = COMMON_USER_PPC64 ,
60
60
.icache_bsize = 128 ,
61
61
.dcache_bsize = 128 ,
62
+ .num_pmcs = 8 ,
62
63
.cpu_setup = __setup_cpu_power3 ,
64
+ #ifdef CONFIG_OPROFILE
65
+ .oprofile_cpu_type = "ppc64/power3" ,
66
+ .oprofile_model = & op_model_rs64 ,
67
+ #endif
63
68
},
64
69
{ /* Power3+ */
65
70
.pvr_mask = 0xffff0000 ,
66
71
.pvr_value = 0x00410000 ,
67
72
.cpu_name = "POWER3 (630+)" ,
68
73
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
69
- CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
70
- CPU_FTR_PMC8 ,
74
+ CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR ,
71
75
.cpu_user_features = COMMON_USER_PPC64 ,
72
76
.icache_bsize = 128 ,
73
77
.dcache_bsize = 128 ,
78
+ .num_pmcs = 8 ,
74
79
.cpu_setup = __setup_cpu_power3 ,
80
+ #ifdef CONFIG_OPROFILE
81
+ .oprofile_cpu_type = "ppc64/power3" ,
82
+ .oprofile_model = & op_model_rs64 ,
83
+ #endif
75
84
},
76
85
{ /* Northstar */
77
86
.pvr_mask = 0xffff0000 ,
78
87
.pvr_value = 0x00330000 ,
79
88
.cpu_name = "RS64-II (northstar)" ,
80
89
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
81
90
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
82
- CPU_FTR_PMC8 | CPU_FTR_MMCRA | CPU_FTR_CTRL ,
91
+ CPU_FTR_MMCRA | CPU_FTR_CTRL ,
83
92
.cpu_user_features = COMMON_USER_PPC64 ,
84
93
.icache_bsize = 128 ,
85
94
.dcache_bsize = 128 ,
95
+ .num_pmcs = 8 ,
86
96
.cpu_setup = __setup_cpu_power3 ,
97
+ #ifdef CONFIG_OPROFILE
98
+ .oprofile_cpu_type = "ppc64/rs64" ,
99
+ .oprofile_model = & op_model_rs64 ,
100
+ #endif
87
101
},
88
102
{ /* Pulsar */
89
103
.pvr_mask = 0xffff0000 ,
90
104
.pvr_value = 0x00340000 ,
91
105
.cpu_name = "RS64-III (pulsar)" ,
92
106
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
93
107
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
94
- CPU_FTR_PMC8 | CPU_FTR_MMCRA | CPU_FTR_CTRL ,
108
+ CPU_FTR_MMCRA | CPU_FTR_CTRL ,
95
109
.cpu_user_features = COMMON_USER_PPC64 ,
96
110
.icache_bsize = 128 ,
97
111
.dcache_bsize = 128 ,
112
+ .num_pmcs = 8 ,
98
113
.cpu_setup = __setup_cpu_power3 ,
114
+ #ifdef CONFIG_OPROFILE
115
+ .oprofile_cpu_type = "ppc64/rs64" ,
116
+ .oprofile_model = & op_model_rs64 ,
117
+ #endif
99
118
},
100
119
{ /* I-star */
101
120
.pvr_mask = 0xffff0000 ,
102
121
.pvr_value = 0x00360000 ,
103
122
.cpu_name = "RS64-III (icestar)" ,
104
123
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
105
124
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
106
- CPU_FTR_PMC8 | CPU_FTR_MMCRA | CPU_FTR_CTRL ,
125
+ CPU_FTR_MMCRA | CPU_FTR_CTRL ,
107
126
.cpu_user_features = COMMON_USER_PPC64 ,
108
127
.icache_bsize = 128 ,
109
128
.dcache_bsize = 128 ,
129
+ .num_pmcs = 8 ,
110
130
.cpu_setup = __setup_cpu_power3 ,
131
+ #ifdef CONFIG_OPROFILE
132
+ .oprofile_cpu_type = "ppc64/rs64" ,
133
+ .oprofile_model = & op_model_rs64 ,
134
+ #endif
111
135
},
112
136
{ /* S-star */
113
137
.pvr_mask = 0xffff0000 ,
114
138
.pvr_value = 0x00370000 ,
115
139
.cpu_name = "RS64-IV (sstar)" ,
116
140
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
117
141
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR |
118
- CPU_FTR_PMC8 | CPU_FTR_MMCRA | CPU_FTR_CTRL ,
142
+ CPU_FTR_MMCRA | CPU_FTR_CTRL ,
119
143
.cpu_user_features = COMMON_USER_PPC64 ,
120
144
.icache_bsize = 128 ,
121
145
.dcache_bsize = 128 ,
146
+ .num_pmcs = 8 ,
122
147
.cpu_setup = __setup_cpu_power3 ,
148
+ #ifdef CONFIG_OPROFILE
149
+ .oprofile_cpu_type = "ppc64/rs64" ,
150
+ .oprofile_model = & op_model_rs64 ,
151
+ #endif
123
152
},
124
153
{ /* Power4 */
125
154
.pvr_mask = 0xffff0000 ,
126
155
.pvr_value = 0x00350000 ,
127
156
.cpu_name = "POWER4 (gp)" ,
128
157
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
129
158
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
130
- CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_PMC8 | CPU_FTR_MMCRA ,
159
+ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA ,
131
160
.cpu_user_features = COMMON_USER_PPC64 ,
132
161
.icache_bsize = 128 ,
133
162
.dcache_bsize = 128 ,
163
+ .num_pmcs = 8 ,
134
164
.cpu_setup = __setup_cpu_power4 ,
165
+ #ifdef CONFIG_OPROFILE
166
+ .oprofile_cpu_type = "ppc64/power4" ,
167
+ .oprofile_model = & op_model_rs64 ,
168
+ #endif
135
169
},
136
170
{ /* Power4+ */
137
171
.pvr_mask = 0xffff0000 ,
138
172
.pvr_value = 0x00380000 ,
139
173
.cpu_name = "POWER4+ (gq)" ,
140
174
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
141
175
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
142
- CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_PMC8 | CPU_FTR_MMCRA ,
176
+ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA ,
143
177
.cpu_user_features = COMMON_USER_PPC64 ,
144
178
.icache_bsize = 128 ,
145
179
.dcache_bsize = 128 ,
180
+ .num_pmcs = 8 ,
146
181
.cpu_setup = __setup_cpu_power4 ,
182
+ #ifdef CONFIG_OPROFILE
183
+ .oprofile_cpu_type = "ppc64/power4" ,
184
+ .oprofile_model = & op_model_power4 ,
185
+ #endif
147
186
},
148
187
{ /* PPC970 */
149
188
.pvr_mask = 0xffff0000 ,
@@ -152,12 +191,17 @@ struct cpu_spec cpu_specs[] = {
152
191
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
153
192
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
154
193
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
155
- CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA ,
194
+ CPU_FTR_CAN_NAP | CPU_FTR_MMCRA ,
156
195
.cpu_user_features = COMMON_USER_PPC64 |
157
196
PPC_FEATURE_HAS_ALTIVEC_COMP ,
158
197
.icache_bsize = 128 ,
159
198
.dcache_bsize = 128 ,
199
+ .num_pmcs = 8 ,
160
200
.cpu_setup = __setup_cpu_ppc970 ,
201
+ #ifdef CONFIG_OPROFILE
202
+ .oprofile_cpu_type = "ppc64/970" ,
203
+ .oprofile_model = & op_model_power4 ,
204
+ #endif
161
205
},
162
206
{ /* PPC970FX */
163
207
.pvr_mask = 0xffff0000 ,
@@ -166,12 +210,17 @@ struct cpu_spec cpu_specs[] = {
166
210
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
167
211
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
168
212
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
169
- CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA ,
213
+ CPU_FTR_CAN_NAP | CPU_FTR_MMCRA ,
170
214
.cpu_user_features = COMMON_USER_PPC64 |
171
215
PPC_FEATURE_HAS_ALTIVEC_COMP ,
172
216
.icache_bsize = 128 ,
173
217
.dcache_bsize = 128 ,
218
+ .num_pmcs = 8 ,
174
219
.cpu_setup = __setup_cpu_ppc970 ,
220
+ #ifdef CONFIG_OPROFILE
221
+ .oprofile_cpu_type = "ppc64/970" ,
222
+ .oprofile_model = & op_model_power4 ,
223
+ #endif
175
224
},
176
225
{ /* PPC970MP */
177
226
.pvr_mask = 0xffff0000 ,
@@ -180,12 +229,16 @@ struct cpu_spec cpu_specs[] = {
180
229
.cpu_features = CPU_FTR_SPLIT_ID_CACHE |
181
230
CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
182
231
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP |
183
- CPU_FTR_CAN_NAP | CPU_FTR_PMC8 | CPU_FTR_MMCRA ,
232
+ CPU_FTR_CAN_NAP | CPU_FTR_MMCRA ,
184
233
.cpu_user_features = COMMON_USER_PPC64 |
185
234
PPC_FEATURE_HAS_ALTIVEC_COMP ,
186
235
.icache_bsize = 128 ,
187
236
.dcache_bsize = 128 ,
188
237
.cpu_setup = __setup_cpu_ppc970 ,
238
+ #ifdef CONFIG_OPROFILE
239
+ .oprofile_cpu_type = "ppc64/970" ,
240
+ .oprofile_model = & op_model_power4 ,
241
+ #endif
189
242
},
190
243
{ /* Power5 */
191
244
.pvr_mask = 0xffff0000 ,
@@ -199,7 +252,12 @@ struct cpu_spec cpu_specs[] = {
199
252
.cpu_user_features = COMMON_USER_PPC64 ,
200
253
.icache_bsize = 128 ,
201
254
.dcache_bsize = 128 ,
255
+ .num_pmcs = 6 ,
202
256
.cpu_setup = __setup_cpu_power4 ,
257
+ #ifdef CONFIG_OPROFILE
258
+ .oprofile_cpu_type = "ppc64/power5" ,
259
+ .oprofile_model = & op_model_power4 ,
260
+ #endif
203
261
},
204
262
{ /* Power5 */
205
263
.pvr_mask = 0xffff0000 ,
@@ -213,7 +271,12 @@ struct cpu_spec cpu_specs[] = {
213
271
.cpu_user_features = COMMON_USER_PPC64 ,
214
272
.icache_bsize = 128 ,
215
273
.dcache_bsize = 128 ,
274
+ .num_pmcs = 6 ,
216
275
.cpu_setup = __setup_cpu_power4 ,
276
+ #ifdef CONFIG_OPROFILE
277
+ .oprofile_cpu_type = "ppc64/power5" ,
278
+ .oprofile_model = & op_model_power4 ,
279
+ #endif
217
280
},
218
281
{ /* BE DD1.x */
219
282
.pvr_mask = 0xffff0000 ,
@@ -239,6 +302,7 @@ struct cpu_spec cpu_specs[] = {
239
302
.cpu_user_features = COMMON_USER_PPC64 ,
240
303
.icache_bsize = 128 ,
241
304
.dcache_bsize = 128 ,
305
+ .num_pmcs = 6 ,
242
306
.cpu_setup = __setup_cpu_power4 ,
243
307
}
244
308
};
0 commit comments