xref: /openbmc/linux/arch/powerpc/kernel/cputable.c (revision 22246614)
1 /*
2  *  Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3  *
4  *  Modifications for ppc64:
5  *      Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6  *
7  *  This program is free software; you can redistribute it and/or
8  *  modify it under the terms of the GNU General Public License
9  *  as published by the Free Software Foundation; either version
10  *  2 of the License, or (at your option) any later version.
11  */
12 
13 #include <linux/string.h>
14 #include <linux/sched.h>
15 #include <linux/threads.h>
16 #include <linux/init.h>
17 #include <linux/module.h>
18 
19 #include <asm/oprofile_impl.h>
20 #include <asm/cputable.h>
21 #include <asm/prom.h>		/* for PTRRELOC on ARCH=ppc */
22 
23 struct cpu_spec* cur_cpu_spec = NULL;
24 EXPORT_SYMBOL(cur_cpu_spec);
25 
26 /* NOTE:
27  * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
28  * the responsibility of the appropriate CPU save/restore functions to
29  * eventually copy these settings over. Those save/restore aren't yet
30  * part of the cputable though. That has to be fixed for both ppc32
31  * and ppc64
32  */
33 #ifdef CONFIG_PPC32
34 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
37 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
48 #endif /* CONFIG_PPC32 */
49 #ifdef CONFIG_PPC64
50 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
51 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
52 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
53 extern void __restore_cpu_pa6t(void);
54 extern void __restore_cpu_ppc970(void);
55 #endif /* CONFIG_PPC64 */
56 
57 /* This table only contains "desktop" CPUs, it need to be filled with embedded
58  * ones as well...
59  */
60 #define COMMON_USER		(PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
61 				 PPC_FEATURE_HAS_MMU)
62 #define COMMON_USER_PPC64	(COMMON_USER | PPC_FEATURE_64)
63 #define COMMON_USER_POWER4	(COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
64 #define COMMON_USER_POWER5	(COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
65 				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
66 #define COMMON_USER_POWER5_PLUS	(COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
67 				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
68 #define COMMON_USER_POWER6	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
69 				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
70 				 PPC_FEATURE_TRUE_LE)
71 #define COMMON_USER_PA6T	(COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
72 				 PPC_FEATURE_TRUE_LE | \
73 				 PPC_FEATURE_HAS_ALTIVEC_COMP)
74 #define COMMON_USER_BOOKE	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
75 				 PPC_FEATURE_BOOKE)
76 
77 static struct cpu_spec __initdata cpu_specs[] = {
78 #ifdef CONFIG_PPC64
79 	{	/* Power3 */
80 		.pvr_mask		= 0xffff0000,
81 		.pvr_value		= 0x00400000,
82 		.cpu_name		= "POWER3 (630)",
83 		.cpu_features		= CPU_FTRS_POWER3,
84 		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
85 		.icache_bsize		= 128,
86 		.dcache_bsize		= 128,
87 		.num_pmcs		= 8,
88 		.pmc_type		= PPC_PMC_IBM,
89 		.oprofile_cpu_type	= "ppc64/power3",
90 		.oprofile_type		= PPC_OPROFILE_RS64,
91 		.machine_check		= machine_check_generic,
92 		.platform		= "power3",
93 	},
94 	{	/* Power3+ */
95 		.pvr_mask		= 0xffff0000,
96 		.pvr_value		= 0x00410000,
97 		.cpu_name		= "POWER3 (630+)",
98 		.cpu_features		= CPU_FTRS_POWER3,
99 		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
100 		.icache_bsize		= 128,
101 		.dcache_bsize		= 128,
102 		.num_pmcs		= 8,
103 		.pmc_type		= PPC_PMC_IBM,
104 		.oprofile_cpu_type	= "ppc64/power3",
105 		.oprofile_type		= PPC_OPROFILE_RS64,
106 		.machine_check		= machine_check_generic,
107 		.platform		= "power3",
108 	},
109 	{	/* Northstar */
110 		.pvr_mask		= 0xffff0000,
111 		.pvr_value		= 0x00330000,
112 		.cpu_name		= "RS64-II (northstar)",
113 		.cpu_features		= CPU_FTRS_RS64,
114 		.cpu_user_features	= COMMON_USER_PPC64,
115 		.icache_bsize		= 128,
116 		.dcache_bsize		= 128,
117 		.num_pmcs		= 8,
118 		.pmc_type		= PPC_PMC_IBM,
119 		.oprofile_cpu_type	= "ppc64/rs64",
120 		.oprofile_type		= PPC_OPROFILE_RS64,
121 		.machine_check		= machine_check_generic,
122 		.platform		= "rs64",
123 	},
124 	{	/* Pulsar */
125 		.pvr_mask		= 0xffff0000,
126 		.pvr_value		= 0x00340000,
127 		.cpu_name		= "RS64-III (pulsar)",
128 		.cpu_features		= CPU_FTRS_RS64,
129 		.cpu_user_features	= COMMON_USER_PPC64,
130 		.icache_bsize		= 128,
131 		.dcache_bsize		= 128,
132 		.num_pmcs		= 8,
133 		.pmc_type		= PPC_PMC_IBM,
134 		.oprofile_cpu_type	= "ppc64/rs64",
135 		.oprofile_type		= PPC_OPROFILE_RS64,
136 		.machine_check		= machine_check_generic,
137 		.platform		= "rs64",
138 	},
139 	{	/* I-star */
140 		.pvr_mask		= 0xffff0000,
141 		.pvr_value		= 0x00360000,
142 		.cpu_name		= "RS64-III (icestar)",
143 		.cpu_features		= CPU_FTRS_RS64,
144 		.cpu_user_features	= COMMON_USER_PPC64,
145 		.icache_bsize		= 128,
146 		.dcache_bsize		= 128,
147 		.num_pmcs		= 8,
148 		.pmc_type		= PPC_PMC_IBM,
149 		.oprofile_cpu_type	= "ppc64/rs64",
150 		.oprofile_type		= PPC_OPROFILE_RS64,
151 		.machine_check		= machine_check_generic,
152 		.platform		= "rs64",
153 	},
154 	{	/* S-star */
155 		.pvr_mask		= 0xffff0000,
156 		.pvr_value		= 0x00370000,
157 		.cpu_name		= "RS64-IV (sstar)",
158 		.cpu_features		= CPU_FTRS_RS64,
159 		.cpu_user_features	= COMMON_USER_PPC64,
160 		.icache_bsize		= 128,
161 		.dcache_bsize		= 128,
162 		.num_pmcs		= 8,
163 		.pmc_type		= PPC_PMC_IBM,
164 		.oprofile_cpu_type	= "ppc64/rs64",
165 		.oprofile_type		= PPC_OPROFILE_RS64,
166 		.machine_check		= machine_check_generic,
167 		.platform		= "rs64",
168 	},
169 	{	/* Power4 */
170 		.pvr_mask		= 0xffff0000,
171 		.pvr_value		= 0x00350000,
172 		.cpu_name		= "POWER4 (gp)",
173 		.cpu_features		= CPU_FTRS_POWER4,
174 		.cpu_user_features	= COMMON_USER_POWER4,
175 		.icache_bsize		= 128,
176 		.dcache_bsize		= 128,
177 		.num_pmcs		= 8,
178 		.pmc_type		= PPC_PMC_IBM,
179 		.oprofile_cpu_type	= "ppc64/power4",
180 		.oprofile_type		= PPC_OPROFILE_POWER4,
181 		.machine_check		= machine_check_generic,
182 		.platform		= "power4",
183 	},
184 	{	/* Power4+ */
185 		.pvr_mask		= 0xffff0000,
186 		.pvr_value		= 0x00380000,
187 		.cpu_name		= "POWER4+ (gq)",
188 		.cpu_features		= CPU_FTRS_POWER4,
189 		.cpu_user_features	= COMMON_USER_POWER4,
190 		.icache_bsize		= 128,
191 		.dcache_bsize		= 128,
192 		.num_pmcs		= 8,
193 		.pmc_type		= PPC_PMC_IBM,
194 		.oprofile_cpu_type	= "ppc64/power4",
195 		.oprofile_type		= PPC_OPROFILE_POWER4,
196 		.machine_check		= machine_check_generic,
197 		.platform		= "power4",
198 	},
199 	{	/* PPC970 */
200 		.pvr_mask		= 0xffff0000,
201 		.pvr_value		= 0x00390000,
202 		.cpu_name		= "PPC970",
203 		.cpu_features		= CPU_FTRS_PPC970,
204 		.cpu_user_features	= COMMON_USER_POWER4 |
205 			PPC_FEATURE_HAS_ALTIVEC_COMP,
206 		.icache_bsize		= 128,
207 		.dcache_bsize		= 128,
208 		.num_pmcs		= 8,
209 		.pmc_type		= PPC_PMC_IBM,
210 		.cpu_setup		= __setup_cpu_ppc970,
211 		.cpu_restore		= __restore_cpu_ppc970,
212 		.oprofile_cpu_type	= "ppc64/970",
213 		.oprofile_type		= PPC_OPROFILE_POWER4,
214 		.machine_check		= machine_check_generic,
215 		.platform		= "ppc970",
216 	},
217 	{	/* PPC970FX */
218 		.pvr_mask		= 0xffff0000,
219 		.pvr_value		= 0x003c0000,
220 		.cpu_name		= "PPC970FX",
221 		.cpu_features		= CPU_FTRS_PPC970,
222 		.cpu_user_features	= COMMON_USER_POWER4 |
223 			PPC_FEATURE_HAS_ALTIVEC_COMP,
224 		.icache_bsize		= 128,
225 		.dcache_bsize		= 128,
226 		.num_pmcs		= 8,
227 		.pmc_type		= PPC_PMC_IBM,
228 		.cpu_setup		= __setup_cpu_ppc970,
229 		.cpu_restore		= __restore_cpu_ppc970,
230 		.oprofile_cpu_type	= "ppc64/970",
231 		.oprofile_type		= PPC_OPROFILE_POWER4,
232 		.machine_check		= machine_check_generic,
233 		.platform		= "ppc970",
234 	},
235 	{	/* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
236 		.pvr_mask		= 0xffffffff,
237 		.pvr_value		= 0x00440100,
238 		.cpu_name		= "PPC970MP",
239 		.cpu_features		= CPU_FTRS_PPC970,
240 		.cpu_user_features	= COMMON_USER_POWER4 |
241 			PPC_FEATURE_HAS_ALTIVEC_COMP,
242 		.icache_bsize		= 128,
243 		.dcache_bsize		= 128,
244 		.num_pmcs		= 8,
245 		.pmc_type		= PPC_PMC_IBM,
246 		.cpu_setup		= __setup_cpu_ppc970,
247 		.cpu_restore		= __restore_cpu_ppc970,
248 		.oprofile_cpu_type	= "ppc64/970MP",
249 		.oprofile_type		= PPC_OPROFILE_POWER4,
250 		.machine_check		= machine_check_generic,
251 		.platform		= "ppc970",
252 	},
253 	{	/* PPC970MP */
254 		.pvr_mask		= 0xffff0000,
255 		.pvr_value		= 0x00440000,
256 		.cpu_name		= "PPC970MP",
257 		.cpu_features		= CPU_FTRS_PPC970,
258 		.cpu_user_features	= COMMON_USER_POWER4 |
259 			PPC_FEATURE_HAS_ALTIVEC_COMP,
260 		.icache_bsize		= 128,
261 		.dcache_bsize		= 128,
262 		.num_pmcs		= 8,
263 		.pmc_type		= PPC_PMC_IBM,
264 		.cpu_setup		= __setup_cpu_ppc970MP,
265 		.cpu_restore		= __restore_cpu_ppc970,
266 		.oprofile_cpu_type	= "ppc64/970MP",
267 		.oprofile_type		= PPC_OPROFILE_POWER4,
268 		.machine_check		= machine_check_generic,
269 		.platform		= "ppc970",
270 	},
271 	{	/* PPC970GX */
272 		.pvr_mask		= 0xffff0000,
273 		.pvr_value		= 0x00450000,
274 		.cpu_name		= "PPC970GX",
275 		.cpu_features		= CPU_FTRS_PPC970,
276 		.cpu_user_features	= COMMON_USER_POWER4 |
277 			PPC_FEATURE_HAS_ALTIVEC_COMP,
278 		.icache_bsize		= 128,
279 		.dcache_bsize		= 128,
280 		.num_pmcs		= 8,
281 		.pmc_type		= PPC_PMC_IBM,
282 		.cpu_setup		= __setup_cpu_ppc970,
283 		.oprofile_cpu_type	= "ppc64/970",
284 		.oprofile_type		= PPC_OPROFILE_POWER4,
285 		.machine_check		= machine_check_generic,
286 		.platform		= "ppc970",
287 	},
288 	{	/* Power5 GR */
289 		.pvr_mask		= 0xffff0000,
290 		.pvr_value		= 0x003a0000,
291 		.cpu_name		= "POWER5 (gr)",
292 		.cpu_features		= CPU_FTRS_POWER5,
293 		.cpu_user_features	= COMMON_USER_POWER5,
294 		.icache_bsize		= 128,
295 		.dcache_bsize		= 128,
296 		.num_pmcs		= 6,
297 		.pmc_type		= PPC_PMC_IBM,
298 		.oprofile_cpu_type	= "ppc64/power5",
299 		.oprofile_type		= PPC_OPROFILE_POWER4,
300 		/* SIHV / SIPR bits are implemented on POWER4+ (GQ)
301 		 * and above but only works on POWER5 and above
302 		 */
303 		.oprofile_mmcra_sihv	= MMCRA_SIHV,
304 		.oprofile_mmcra_sipr	= MMCRA_SIPR,
305 		.machine_check		= machine_check_generic,
306 		.platform		= "power5",
307 	},
308 	{	/* Power5++ */
309 		.pvr_mask		= 0xffffff00,
310 		.pvr_value		= 0x003b0300,
311 		.cpu_name		= "POWER5+ (gs)",
312 		.cpu_features		= CPU_FTRS_POWER5,
313 		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
314 		.icache_bsize		= 128,
315 		.dcache_bsize		= 128,
316 		.num_pmcs		= 6,
317 		.oprofile_cpu_type	= "ppc64/power5++",
318 		.oprofile_type		= PPC_OPROFILE_POWER4,
319 		.oprofile_mmcra_sihv	= MMCRA_SIHV,
320 		.oprofile_mmcra_sipr	= MMCRA_SIPR,
321 		.machine_check		= machine_check_generic,
322 		.platform		= "power5+",
323 	},
324 	{	/* Power5 GS */
325 		.pvr_mask		= 0xffff0000,
326 		.pvr_value		= 0x003b0000,
327 		.cpu_name		= "POWER5+ (gs)",
328 		.cpu_features		= CPU_FTRS_POWER5,
329 		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
330 		.icache_bsize		= 128,
331 		.dcache_bsize		= 128,
332 		.num_pmcs		= 6,
333 		.pmc_type		= PPC_PMC_IBM,
334 		.oprofile_cpu_type	= "ppc64/power5+",
335 		.oprofile_type		= PPC_OPROFILE_POWER4,
336 		.oprofile_mmcra_sihv	= MMCRA_SIHV,
337 		.oprofile_mmcra_sipr	= MMCRA_SIPR,
338 		.machine_check		= machine_check_generic,
339 		.platform		= "power5+",
340 	},
341 	{	/* POWER6 in P5+ mode; 2.04-compliant processor */
342 		.pvr_mask		= 0xffffffff,
343 		.pvr_value		= 0x0f000001,
344 		.cpu_name		= "POWER5+",
345 		.cpu_features		= CPU_FTRS_POWER5,
346 		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
347 		.icache_bsize		= 128,
348 		.dcache_bsize		= 128,
349 		.machine_check		= machine_check_generic,
350 		.platform		= "power5+",
351 	},
352 	{	/* Power6 */
353 		.pvr_mask		= 0xffff0000,
354 		.pvr_value		= 0x003e0000,
355 		.cpu_name		= "POWER6 (raw)",
356 		.cpu_features		= CPU_FTRS_POWER6,
357 		.cpu_user_features	= COMMON_USER_POWER6 |
358 			PPC_FEATURE_POWER6_EXT,
359 		.icache_bsize		= 128,
360 		.dcache_bsize		= 128,
361 		.num_pmcs		= 6,
362 		.pmc_type		= PPC_PMC_IBM,
363 		.oprofile_cpu_type	= "ppc64/power6",
364 		.oprofile_type		= PPC_OPROFILE_POWER4,
365 		.oprofile_mmcra_sihv	= POWER6_MMCRA_SIHV,
366 		.oprofile_mmcra_sipr	= POWER6_MMCRA_SIPR,
367 		.oprofile_mmcra_clear	= POWER6_MMCRA_THRM |
368 			POWER6_MMCRA_OTHER,
369 		.machine_check		= machine_check_generic,
370 		.platform		= "power6x",
371 	},
372 	{	/* 2.05-compliant processor, i.e. Power6 "architected" mode */
373 		.pvr_mask		= 0xffffffff,
374 		.pvr_value		= 0x0f000002,
375 		.cpu_name		= "POWER6 (architected)",
376 		.cpu_features		= CPU_FTRS_POWER6,
377 		.cpu_user_features	= COMMON_USER_POWER6,
378 		.icache_bsize		= 128,
379 		.dcache_bsize		= 128,
380 		.machine_check		= machine_check_generic,
381 		.platform		= "power6",
382 	},
383 	{	/* Cell Broadband Engine */
384 		.pvr_mask		= 0xffff0000,
385 		.pvr_value		= 0x00700000,
386 		.cpu_name		= "Cell Broadband Engine",
387 		.cpu_features		= CPU_FTRS_CELL,
388 		.cpu_user_features	= COMMON_USER_PPC64 |
389 			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
390 			PPC_FEATURE_SMT,
391 		.icache_bsize		= 128,
392 		.dcache_bsize		= 128,
393 		.num_pmcs		= 4,
394 		.pmc_type		= PPC_PMC_IBM,
395 		.oprofile_cpu_type	= "ppc64/cell-be",
396 		.oprofile_type		= PPC_OPROFILE_CELL,
397 		.machine_check		= machine_check_generic,
398 		.platform		= "ppc-cell-be",
399 	},
400 	{	/* PA Semi PA6T */
401 		.pvr_mask		= 0x7fff0000,
402 		.pvr_value		= 0x00900000,
403 		.cpu_name		= "PA6T",
404 		.cpu_features		= CPU_FTRS_PA6T,
405 		.cpu_user_features	= COMMON_USER_PA6T,
406 		.icache_bsize		= 64,
407 		.dcache_bsize		= 64,
408 		.num_pmcs		= 6,
409 		.pmc_type		= PPC_PMC_PA6T,
410 		.cpu_setup		= __setup_cpu_pa6t,
411 		.cpu_restore		= __restore_cpu_pa6t,
412 		.oprofile_cpu_type	= "ppc64/pa6t",
413 		.oprofile_type		= PPC_OPROFILE_PA6T,
414 		.machine_check		= machine_check_generic,
415 		.platform		= "pa6t",
416 	},
417 	{	/* default match */
418 		.pvr_mask		= 0x00000000,
419 		.pvr_value		= 0x00000000,
420 		.cpu_name		= "POWER4 (compatible)",
421 		.cpu_features		= CPU_FTRS_COMPATIBLE,
422 		.cpu_user_features	= COMMON_USER_PPC64,
423 		.icache_bsize		= 128,
424 		.dcache_bsize		= 128,
425 		.num_pmcs		= 6,
426 		.pmc_type		= PPC_PMC_IBM,
427 		.machine_check		= machine_check_generic,
428 		.platform		= "power4",
429 	}
430 #endif	/* CONFIG_PPC64 */
431 #ifdef CONFIG_PPC32
432 #if CLASSIC_PPC
433 	{	/* 601 */
434 		.pvr_mask		= 0xffff0000,
435 		.pvr_value		= 0x00010000,
436 		.cpu_name		= "601",
437 		.cpu_features		= CPU_FTRS_PPC601,
438 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_601_INSTR |
439 			PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
440 		.icache_bsize		= 32,
441 		.dcache_bsize		= 32,
442 		.machine_check		= machine_check_generic,
443 		.platform		= "ppc601",
444 	},
445 	{	/* 603 */
446 		.pvr_mask		= 0xffff0000,
447 		.pvr_value		= 0x00030000,
448 		.cpu_name		= "603",
449 		.cpu_features		= CPU_FTRS_603,
450 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
451 		.icache_bsize		= 32,
452 		.dcache_bsize		= 32,
453 		.cpu_setup		= __setup_cpu_603,
454 		.machine_check		= machine_check_generic,
455 		.platform		= "ppc603",
456 	},
457 	{	/* 603e */
458 		.pvr_mask		= 0xffff0000,
459 		.pvr_value		= 0x00060000,
460 		.cpu_name		= "603e",
461 		.cpu_features		= CPU_FTRS_603,
462 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
463 		.icache_bsize		= 32,
464 		.dcache_bsize		= 32,
465 		.cpu_setup		= __setup_cpu_603,
466 		.machine_check		= machine_check_generic,
467 		.platform		= "ppc603",
468 	},
469 	{	/* 603ev */
470 		.pvr_mask		= 0xffff0000,
471 		.pvr_value		= 0x00070000,
472 		.cpu_name		= "603ev",
473 		.cpu_features		= CPU_FTRS_603,
474 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
475 		.icache_bsize		= 32,
476 		.dcache_bsize		= 32,
477 		.cpu_setup		= __setup_cpu_603,
478 		.machine_check		= machine_check_generic,
479 		.platform		= "ppc603",
480 	},
481 	{	/* 604 */
482 		.pvr_mask		= 0xffff0000,
483 		.pvr_value		= 0x00040000,
484 		.cpu_name		= "604",
485 		.cpu_features		= CPU_FTRS_604,
486 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
487 		.icache_bsize		= 32,
488 		.dcache_bsize		= 32,
489 		.num_pmcs		= 2,
490 		.cpu_setup		= __setup_cpu_604,
491 		.machine_check		= machine_check_generic,
492 		.platform		= "ppc604",
493 	},
494 	{	/* 604e */
495 		.pvr_mask		= 0xfffff000,
496 		.pvr_value		= 0x00090000,
497 		.cpu_name		= "604e",
498 		.cpu_features		= CPU_FTRS_604,
499 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
500 		.icache_bsize		= 32,
501 		.dcache_bsize		= 32,
502 		.num_pmcs		= 4,
503 		.cpu_setup		= __setup_cpu_604,
504 		.machine_check		= machine_check_generic,
505 		.platform		= "ppc604",
506 	},
507 	{	/* 604r */
508 		.pvr_mask		= 0xffff0000,
509 		.pvr_value		= 0x00090000,
510 		.cpu_name		= "604r",
511 		.cpu_features		= CPU_FTRS_604,
512 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
513 		.icache_bsize		= 32,
514 		.dcache_bsize		= 32,
515 		.num_pmcs		= 4,
516 		.cpu_setup		= __setup_cpu_604,
517 		.machine_check		= machine_check_generic,
518 		.platform		= "ppc604",
519 	},
520 	{	/* 604ev */
521 		.pvr_mask		= 0xffff0000,
522 		.pvr_value		= 0x000a0000,
523 		.cpu_name		= "604ev",
524 		.cpu_features		= CPU_FTRS_604,
525 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
526 		.icache_bsize		= 32,
527 		.dcache_bsize		= 32,
528 		.num_pmcs		= 4,
529 		.cpu_setup		= __setup_cpu_604,
530 		.machine_check		= machine_check_generic,
531 		.platform		= "ppc604",
532 	},
533 	{	/* 740/750 (0x4202, don't support TAU ?) */
534 		.pvr_mask		= 0xffffffff,
535 		.pvr_value		= 0x00084202,
536 		.cpu_name		= "740/750",
537 		.cpu_features		= CPU_FTRS_740_NOTAU,
538 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
539 		.icache_bsize		= 32,
540 		.dcache_bsize		= 32,
541 		.num_pmcs		= 4,
542 		.cpu_setup		= __setup_cpu_750,
543 		.machine_check		= machine_check_generic,
544 		.platform		= "ppc750",
545 	},
546 	{	/* 750CX (80100 and 8010x?) */
547 		.pvr_mask		= 0xfffffff0,
548 		.pvr_value		= 0x00080100,
549 		.cpu_name		= "750CX",
550 		.cpu_features		= CPU_FTRS_750,
551 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
552 		.icache_bsize		= 32,
553 		.dcache_bsize		= 32,
554 		.num_pmcs		= 4,
555 		.cpu_setup		= __setup_cpu_750cx,
556 		.machine_check		= machine_check_generic,
557 		.platform		= "ppc750",
558 	},
559 	{	/* 750CX (82201 and 82202) */
560 		.pvr_mask		= 0xfffffff0,
561 		.pvr_value		= 0x00082200,
562 		.cpu_name		= "750CX",
563 		.cpu_features		= CPU_FTRS_750,
564 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
565 		.icache_bsize		= 32,
566 		.dcache_bsize		= 32,
567 		.num_pmcs		= 4,
568 		.cpu_setup		= __setup_cpu_750cx,
569 		.machine_check		= machine_check_generic,
570 		.platform		= "ppc750",
571 	},
572 	{	/* 750CXe (82214) */
573 		.pvr_mask		= 0xfffffff0,
574 		.pvr_value		= 0x00082210,
575 		.cpu_name		= "750CXe",
576 		.cpu_features		= CPU_FTRS_750,
577 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
578 		.icache_bsize		= 32,
579 		.dcache_bsize		= 32,
580 		.num_pmcs		= 4,
581 		.cpu_setup		= __setup_cpu_750cx,
582 		.machine_check		= machine_check_generic,
583 		.platform		= "ppc750",
584 	},
585 	{	/* 750CXe "Gekko" (83214) */
586 		.pvr_mask		= 0xffffffff,
587 		.pvr_value		= 0x00083214,
588 		.cpu_name		= "750CXe",
589 		.cpu_features		= CPU_FTRS_750,
590 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
591 		.icache_bsize		= 32,
592 		.dcache_bsize		= 32,
593 		.num_pmcs		= 4,
594 		.cpu_setup		= __setup_cpu_750cx,
595 		.machine_check		= machine_check_generic,
596 		.platform		= "ppc750",
597 	},
598 	{	/* 750CL */
599 		.pvr_mask		= 0xfffff0f0,
600 		.pvr_value		= 0x00087010,
601 		.cpu_name		= "750CL",
602 		.cpu_features		= CPU_FTRS_750CL,
603 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
604 		.icache_bsize		= 32,
605 		.dcache_bsize		= 32,
606 		.num_pmcs		= 4,
607 		.cpu_setup		= __setup_cpu_750,
608 		.machine_check		= machine_check_generic,
609 		.platform		= "ppc750",
610 	},
611 	{	/* 745/755 */
612 		.pvr_mask		= 0xfffff000,
613 		.pvr_value		= 0x00083000,
614 		.cpu_name		= "745/755",
615 		.cpu_features		= CPU_FTRS_750,
616 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
617 		.icache_bsize		= 32,
618 		.dcache_bsize		= 32,
619 		.num_pmcs		= 4,
620 		.cpu_setup		= __setup_cpu_750,
621 		.machine_check		= machine_check_generic,
622 		.platform		= "ppc750",
623 	},
624 	{	/* 750FX rev 1.x */
625 		.pvr_mask		= 0xffffff00,
626 		.pvr_value		= 0x70000100,
627 		.cpu_name		= "750FX",
628 		.cpu_features		= CPU_FTRS_750FX1,
629 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
630 		.icache_bsize		= 32,
631 		.dcache_bsize		= 32,
632 		.num_pmcs		= 4,
633 		.cpu_setup		= __setup_cpu_750,
634 		.machine_check		= machine_check_generic,
635 		.platform		= "ppc750",
636 	},
637 	{	/* 750FX rev 2.0 must disable HID0[DPM] */
638 		.pvr_mask		= 0xffffffff,
639 		.pvr_value		= 0x70000200,
640 		.cpu_name		= "750FX",
641 		.cpu_features		= CPU_FTRS_750FX2,
642 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
643 		.icache_bsize		= 32,
644 		.dcache_bsize		= 32,
645 		.num_pmcs		= 4,
646 		.cpu_setup		= __setup_cpu_750,
647 		.machine_check		= machine_check_generic,
648 		.platform		= "ppc750",
649 	},
650 	{	/* 750FX (All revs except 2.0) */
651 		.pvr_mask		= 0xffff0000,
652 		.pvr_value		= 0x70000000,
653 		.cpu_name		= "750FX",
654 		.cpu_features		= CPU_FTRS_750FX,
655 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
656 		.icache_bsize		= 32,
657 		.dcache_bsize		= 32,
658 		.num_pmcs		= 4,
659 		.cpu_setup		= __setup_cpu_750fx,
660 		.machine_check		= machine_check_generic,
661 		.platform		= "ppc750",
662 	},
663 	{	/* 750GX */
664 		.pvr_mask		= 0xffff0000,
665 		.pvr_value		= 0x70020000,
666 		.cpu_name		= "750GX",
667 		.cpu_features		= CPU_FTRS_750GX,
668 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
669 		.icache_bsize		= 32,
670 		.dcache_bsize		= 32,
671 		.num_pmcs		= 4,
672 		.cpu_setup		= __setup_cpu_750fx,
673 		.machine_check		= machine_check_generic,
674 		.platform		= "ppc750",
675 	},
676 	{	/* 740/750 (L2CR bit need fixup for 740) */
677 		.pvr_mask		= 0xffff0000,
678 		.pvr_value		= 0x00080000,
679 		.cpu_name		= "740/750",
680 		.cpu_features		= CPU_FTRS_740,
681 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
682 		.icache_bsize		= 32,
683 		.dcache_bsize		= 32,
684 		.num_pmcs		= 4,
685 		.cpu_setup		= __setup_cpu_750,
686 		.machine_check		= machine_check_generic,
687 		.platform		= "ppc750",
688 	},
689 	{	/* 7400 rev 1.1 ? (no TAU) */
690 		.pvr_mask		= 0xffffffff,
691 		.pvr_value		= 0x000c1101,
692 		.cpu_name		= "7400 (1.1)",
693 		.cpu_features		= CPU_FTRS_7400_NOTAU,
694 		.cpu_user_features	= COMMON_USER |
695 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
696 		.icache_bsize		= 32,
697 		.dcache_bsize		= 32,
698 		.num_pmcs		= 4,
699 		.cpu_setup		= __setup_cpu_7400,
700 		.machine_check		= machine_check_generic,
701 		.platform		= "ppc7400",
702 	},
703 	{	/* 7400 */
704 		.pvr_mask		= 0xffff0000,
705 		.pvr_value		= 0x000c0000,
706 		.cpu_name		= "7400",
707 		.cpu_features		= CPU_FTRS_7400,
708 		.cpu_user_features	= COMMON_USER |
709 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
710 		.icache_bsize		= 32,
711 		.dcache_bsize		= 32,
712 		.num_pmcs		= 4,
713 		.cpu_setup		= __setup_cpu_7400,
714 		.machine_check		= machine_check_generic,
715 		.platform		= "ppc7400",
716 	},
717 	{	/* 7410 */
718 		.pvr_mask		= 0xffff0000,
719 		.pvr_value		= 0x800c0000,
720 		.cpu_name		= "7410",
721 		.cpu_features		= CPU_FTRS_7400,
722 		.cpu_user_features	= COMMON_USER |
723 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
724 		.icache_bsize		= 32,
725 		.dcache_bsize		= 32,
726 		.num_pmcs		= 4,
727 		.cpu_setup		= __setup_cpu_7410,
728 		.machine_check		= machine_check_generic,
729 		.platform		= "ppc7400",
730 	},
731 	{	/* 7450 2.0 - no doze/nap */
732 		.pvr_mask		= 0xffffffff,
733 		.pvr_value		= 0x80000200,
734 		.cpu_name		= "7450",
735 		.cpu_features		= CPU_FTRS_7450_20,
736 		.cpu_user_features	= COMMON_USER |
737 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
738 		.icache_bsize		= 32,
739 		.dcache_bsize		= 32,
740 		.num_pmcs		= 6,
741 		.cpu_setup		= __setup_cpu_745x,
742 		.oprofile_cpu_type      = "ppc/7450",
743 		.oprofile_type		= PPC_OPROFILE_G4,
744 		.machine_check		= machine_check_generic,
745 		.platform		= "ppc7450",
746 	},
747 	{	/* 7450 2.1 */
748 		.pvr_mask		= 0xffffffff,
749 		.pvr_value		= 0x80000201,
750 		.cpu_name		= "7450",
751 		.cpu_features		= CPU_FTRS_7450_21,
752 		.cpu_user_features	= COMMON_USER |
753 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
754 		.icache_bsize		= 32,
755 		.dcache_bsize		= 32,
756 		.num_pmcs		= 6,
757 		.cpu_setup		= __setup_cpu_745x,
758 		.oprofile_cpu_type      = "ppc/7450",
759 		.oprofile_type		= PPC_OPROFILE_G4,
760 		.machine_check		= machine_check_generic,
761 		.platform		= "ppc7450",
762 	},
763 	{	/* 7450 2.3 and newer */
764 		.pvr_mask		= 0xffff0000,
765 		.pvr_value		= 0x80000000,
766 		.cpu_name		= "7450",
767 		.cpu_features		= CPU_FTRS_7450_23,
768 		.cpu_user_features	= COMMON_USER |
769 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
770 		.icache_bsize		= 32,
771 		.dcache_bsize		= 32,
772 		.num_pmcs		= 6,
773 		.cpu_setup		= __setup_cpu_745x,
774 		.oprofile_cpu_type      = "ppc/7450",
775 		.oprofile_type		= PPC_OPROFILE_G4,
776 		.machine_check		= machine_check_generic,
777 		.platform		= "ppc7450",
778 	},
779 	{	/* 7455 rev 1.x */
780 		.pvr_mask		= 0xffffff00,
781 		.pvr_value		= 0x80010100,
782 		.cpu_name		= "7455",
783 		.cpu_features		= CPU_FTRS_7455_1,
784 		.cpu_user_features	= COMMON_USER |
785 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
786 		.icache_bsize		= 32,
787 		.dcache_bsize		= 32,
788 		.num_pmcs		= 6,
789 		.cpu_setup		= __setup_cpu_745x,
790 		.oprofile_cpu_type      = "ppc/7450",
791 		.oprofile_type		= PPC_OPROFILE_G4,
792 		.machine_check		= machine_check_generic,
793 		.platform		= "ppc7450",
794 	},
795 	{	/* 7455 rev 2.0 */
796 		.pvr_mask		= 0xffffffff,
797 		.pvr_value		= 0x80010200,
798 		.cpu_name		= "7455",
799 		.cpu_features		= CPU_FTRS_7455_20,
800 		.cpu_user_features	= COMMON_USER |
801 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
802 		.icache_bsize		= 32,
803 		.dcache_bsize		= 32,
804 		.num_pmcs		= 6,
805 		.cpu_setup		= __setup_cpu_745x,
806 		.oprofile_cpu_type      = "ppc/7450",
807 		.oprofile_type		= PPC_OPROFILE_G4,
808 		.machine_check		= machine_check_generic,
809 		.platform		= "ppc7450",
810 	},
811 	{	/* 7455 others */
812 		.pvr_mask		= 0xffff0000,
813 		.pvr_value		= 0x80010000,
814 		.cpu_name		= "7455",
815 		.cpu_features		= CPU_FTRS_7455,
816 		.cpu_user_features	= COMMON_USER |
817 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
818 		.icache_bsize		= 32,
819 		.dcache_bsize		= 32,
820 		.num_pmcs		= 6,
821 		.cpu_setup		= __setup_cpu_745x,
822 		.oprofile_cpu_type      = "ppc/7450",
823 		.oprofile_type		= PPC_OPROFILE_G4,
824 		.machine_check		= machine_check_generic,
825 		.platform		= "ppc7450",
826 	},
827 	{	/* 7447/7457 Rev 1.0 */
828 		.pvr_mask		= 0xffffffff,
829 		.pvr_value		= 0x80020100,
830 		.cpu_name		= "7447/7457",
831 		.cpu_features		= CPU_FTRS_7447_10,
832 		.cpu_user_features	= COMMON_USER |
833 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
834 		.icache_bsize		= 32,
835 		.dcache_bsize		= 32,
836 		.num_pmcs		= 6,
837 		.cpu_setup		= __setup_cpu_745x,
838 		.oprofile_cpu_type      = "ppc/7450",
839 		.oprofile_type		= PPC_OPROFILE_G4,
840 		.machine_check		= machine_check_generic,
841 		.platform		= "ppc7450",
842 	},
843 	{	/* 7447/7457 Rev 1.1 */
844 		.pvr_mask		= 0xffffffff,
845 		.pvr_value		= 0x80020101,
846 		.cpu_name		= "7447/7457",
847 		.cpu_features		= CPU_FTRS_7447_10,
848 		.cpu_user_features	= COMMON_USER |
849 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
850 		.icache_bsize		= 32,
851 		.dcache_bsize		= 32,
852 		.num_pmcs		= 6,
853 		.cpu_setup		= __setup_cpu_745x,
854 		.oprofile_cpu_type      = "ppc/7450",
855 		.oprofile_type		= PPC_OPROFILE_G4,
856 		.machine_check		= machine_check_generic,
857 		.platform		= "ppc7450",
858 	},
859 	{	/* 7447/7457 Rev 1.2 and later */
860 		.pvr_mask		= 0xffff0000,
861 		.pvr_value		= 0x80020000,
862 		.cpu_name		= "7447/7457",
863 		.cpu_features		= CPU_FTRS_7447,
864 		.cpu_user_features	= COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
865 		.icache_bsize		= 32,
866 		.dcache_bsize		= 32,
867 		.num_pmcs		= 6,
868 		.cpu_setup		= __setup_cpu_745x,
869 		.oprofile_cpu_type      = "ppc/7450",
870 		.oprofile_type		= PPC_OPROFILE_G4,
871 		.machine_check		= machine_check_generic,
872 		.platform		= "ppc7450",
873 	},
874 	{	/* 7447A */
875 		.pvr_mask		= 0xffff0000,
876 		.pvr_value		= 0x80030000,
877 		.cpu_name		= "7447A",
878 		.cpu_features		= CPU_FTRS_7447A,
879 		.cpu_user_features	= COMMON_USER |
880 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
881 		.icache_bsize		= 32,
882 		.dcache_bsize		= 32,
883 		.num_pmcs		= 6,
884 		.cpu_setup		= __setup_cpu_745x,
885 		.oprofile_cpu_type      = "ppc/7450",
886 		.oprofile_type		= PPC_OPROFILE_G4,
887 		.machine_check		= machine_check_generic,
888 		.platform		= "ppc7450",
889 	},
890 	{	/* 7448 */
891 		.pvr_mask		= 0xffff0000,
892 		.pvr_value		= 0x80040000,
893 		.cpu_name		= "7448",
894 		.cpu_features		= CPU_FTRS_7448,
895 		.cpu_user_features	= COMMON_USER |
896 			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
897 		.icache_bsize		= 32,
898 		.dcache_bsize		= 32,
899 		.num_pmcs		= 6,
900 		.cpu_setup		= __setup_cpu_745x,
901 		.oprofile_cpu_type      = "ppc/7450",
902 		.oprofile_type		= PPC_OPROFILE_G4,
903 		.machine_check		= machine_check_generic,
904 		.platform		= "ppc7450",
905 	},
906 	{	/* 82xx (8240, 8245, 8260 are all 603e cores) */
907 		.pvr_mask		= 0x7fff0000,
908 		.pvr_value		= 0x00810000,
909 		.cpu_name		= "82xx",
910 		.cpu_features		= CPU_FTRS_82XX,
911 		.cpu_user_features	= COMMON_USER,
912 		.icache_bsize		= 32,
913 		.dcache_bsize		= 32,
914 		.cpu_setup		= __setup_cpu_603,
915 		.machine_check		= machine_check_generic,
916 		.platform		= "ppc603",
917 	},
918 	{	/* All G2_LE (603e core, plus some) have the same pvr */
919 		.pvr_mask		= 0x7fff0000,
920 		.pvr_value		= 0x00820000,
921 		.cpu_name		= "G2_LE",
922 		.cpu_features		= CPU_FTRS_G2_LE,
923 		.cpu_user_features	= COMMON_USER,
924 		.icache_bsize		= 32,
925 		.dcache_bsize		= 32,
926 		.cpu_setup		= __setup_cpu_603,
927 		.machine_check		= machine_check_generic,
928 		.platform		= "ppc603",
929 	},
930 	{	/* e300c1 (a 603e core, plus some) on 83xx */
931 		.pvr_mask		= 0x7fff0000,
932 		.pvr_value		= 0x00830000,
933 		.cpu_name		= "e300c1",
934 		.cpu_features		= CPU_FTRS_E300,
935 		.cpu_user_features	= COMMON_USER,
936 		.icache_bsize		= 32,
937 		.dcache_bsize		= 32,
938 		.cpu_setup		= __setup_cpu_603,
939 		.machine_check		= machine_check_generic,
940 		.platform		= "ppc603",
941 	},
942 	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
943 		.pvr_mask		= 0x7fff0000,
944 		.pvr_value		= 0x00840000,
945 		.cpu_name		= "e300c2",
946 		.cpu_features		= CPU_FTRS_E300C2,
947 		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
948 		.icache_bsize		= 32,
949 		.dcache_bsize		= 32,
950 		.cpu_setup		= __setup_cpu_603,
951 		.machine_check		= machine_check_generic,
952 		.platform		= "ppc603",
953 	},
954 	{	/* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
955 		.pvr_mask		= 0x7fff0000,
956 		.pvr_value		= 0x00850000,
957 		.cpu_name		= "e300c3",
958 		.cpu_features		= CPU_FTRS_E300,
959 		.cpu_user_features	= COMMON_USER,
960 		.icache_bsize		= 32,
961 		.dcache_bsize		= 32,
962 		.cpu_setup		= __setup_cpu_603,
963 		.num_pmcs		= 4,
964 		.oprofile_cpu_type	= "ppc/e300",
965 		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
966 		.platform		= "ppc603",
967 	},
968 	{	/* e300c4 (e300c1, plus one IU) */
969 		.pvr_mask		= 0x7fff0000,
970 		.pvr_value		= 0x00860000,
971 		.cpu_name		= "e300c4",
972 		.cpu_features		= CPU_FTRS_E300,
973 		.cpu_user_features	= COMMON_USER,
974 		.icache_bsize		= 32,
975 		.dcache_bsize		= 32,
976 		.cpu_setup		= __setup_cpu_603,
977 		.machine_check		= machine_check_generic,
978 		.num_pmcs		= 4,
979 		.oprofile_cpu_type	= "ppc/e300",
980 		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
981 		.platform		= "ppc603",
982 	},
983 	{	/* default match, we assume split I/D cache & TB (non-601)... */
984 		.pvr_mask		= 0x00000000,
985 		.pvr_value		= 0x00000000,
986 		.cpu_name		= "(generic PPC)",
987 		.cpu_features		= CPU_FTRS_CLASSIC32,
988 		.cpu_user_features	= COMMON_USER,
989 		.icache_bsize		= 32,
990 		.dcache_bsize		= 32,
991 		.machine_check		= machine_check_generic,
992 		.platform		= "ppc603",
993 	},
994 #endif /* CLASSIC_PPC */
995 #ifdef CONFIG_8xx
996 	{	/* 8xx */
997 		.pvr_mask		= 0xffff0000,
998 		.pvr_value		= 0x00500000,
999 		.cpu_name		= "8xx",
1000 		/* CPU_FTR_MAYBE_CAN_DOZE is possible,
1001 		 * if the 8xx code is there.... */
1002 		.cpu_features		= CPU_FTRS_8XX,
1003 		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1004 		.icache_bsize		= 16,
1005 		.dcache_bsize		= 16,
1006 		.platform		= "ppc823",
1007 	},
1008 #endif /* CONFIG_8xx */
1009 #ifdef CONFIG_40x
1010 	{	/* 403GC */
1011 		.pvr_mask		= 0xffffff00,
1012 		.pvr_value		= 0x00200200,
1013 		.cpu_name		= "403GC",
1014 		.cpu_features		= CPU_FTRS_40X,
1015 		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1016 		.icache_bsize		= 16,
1017 		.dcache_bsize		= 16,
1018 		.machine_check		= machine_check_4xx,
1019 		.platform		= "ppc403",
1020 	},
1021 	{	/* 403GCX */
1022 		.pvr_mask		= 0xffffff00,
1023 		.pvr_value		= 0x00201400,
1024 		.cpu_name		= "403GCX",
1025 		.cpu_features		= CPU_FTRS_40X,
1026 		.cpu_user_features	= PPC_FEATURE_32 |
1027 		 	PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1028 		.icache_bsize		= 16,
1029 		.dcache_bsize		= 16,
1030 		.machine_check		= machine_check_4xx,
1031 		.platform		= "ppc403",
1032 	},
1033 	{	/* 403G ?? */
1034 		.pvr_mask		= 0xffff0000,
1035 		.pvr_value		= 0x00200000,
1036 		.cpu_name		= "403G ??",
1037 		.cpu_features		= CPU_FTRS_40X,
1038 		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1039 		.icache_bsize		= 16,
1040 		.dcache_bsize		= 16,
1041 		.machine_check		= machine_check_4xx,
1042 		.platform		= "ppc403",
1043 	},
1044 	{	/* 405GP */
1045 		.pvr_mask		= 0xffff0000,
1046 		.pvr_value		= 0x40110000,
1047 		.cpu_name		= "405GP",
1048 		.cpu_features		= CPU_FTRS_40X,
1049 		.cpu_user_features	= PPC_FEATURE_32 |
1050 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1051 		.icache_bsize		= 32,
1052 		.dcache_bsize		= 32,
1053 		.machine_check		= machine_check_4xx,
1054 		.platform		= "ppc405",
1055 	},
1056 	{	/* STB 03xxx */
1057 		.pvr_mask		= 0xffff0000,
1058 		.pvr_value		= 0x40130000,
1059 		.cpu_name		= "STB03xxx",
1060 		.cpu_features		= CPU_FTRS_40X,
1061 		.cpu_user_features	= PPC_FEATURE_32 |
1062 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1063 		.icache_bsize		= 32,
1064 		.dcache_bsize		= 32,
1065 		.machine_check		= machine_check_4xx,
1066 		.platform		= "ppc405",
1067 	},
1068 	{	/* STB 04xxx */
1069 		.pvr_mask		= 0xffff0000,
1070 		.pvr_value		= 0x41810000,
1071 		.cpu_name		= "STB04xxx",
1072 		.cpu_features		= CPU_FTRS_40X,
1073 		.cpu_user_features	= PPC_FEATURE_32 |
1074 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1075 		.icache_bsize		= 32,
1076 		.dcache_bsize		= 32,
1077 		.machine_check		= machine_check_4xx,
1078 		.platform		= "ppc405",
1079 	},
1080 	{	/* NP405L */
1081 		.pvr_mask		= 0xffff0000,
1082 		.pvr_value		= 0x41610000,
1083 		.cpu_name		= "NP405L",
1084 		.cpu_features		= CPU_FTRS_40X,
1085 		.cpu_user_features	= PPC_FEATURE_32 |
1086 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1087 		.icache_bsize		= 32,
1088 		.dcache_bsize		= 32,
1089 		.machine_check		= machine_check_4xx,
1090 		.platform		= "ppc405",
1091 	},
1092 	{	/* NP4GS3 */
1093 		.pvr_mask		= 0xffff0000,
1094 		.pvr_value		= 0x40B10000,
1095 		.cpu_name		= "NP4GS3",
1096 		.cpu_features		= CPU_FTRS_40X,
1097 		.cpu_user_features	= PPC_FEATURE_32 |
1098 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1099 		.icache_bsize		= 32,
1100 		.dcache_bsize		= 32,
1101 		.machine_check		= machine_check_4xx,
1102 		.platform		= "ppc405",
1103 	},
1104 	{   /* NP405H */
1105 		.pvr_mask		= 0xffff0000,
1106 		.pvr_value		= 0x41410000,
1107 		.cpu_name		= "NP405H",
1108 		.cpu_features		= CPU_FTRS_40X,
1109 		.cpu_user_features	= PPC_FEATURE_32 |
1110 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1111 		.icache_bsize		= 32,
1112 		.dcache_bsize		= 32,
1113 		.machine_check		= machine_check_4xx,
1114 		.platform		= "ppc405",
1115 	},
1116 	{	/* 405GPr */
1117 		.pvr_mask		= 0xffff0000,
1118 		.pvr_value		= 0x50910000,
1119 		.cpu_name		= "405GPr",
1120 		.cpu_features		= CPU_FTRS_40X,
1121 		.cpu_user_features	= PPC_FEATURE_32 |
1122 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1123 		.icache_bsize		= 32,
1124 		.dcache_bsize		= 32,
1125 		.machine_check		= machine_check_4xx,
1126 		.platform		= "ppc405",
1127 	},
1128 	{   /* STBx25xx */
1129 		.pvr_mask		= 0xffff0000,
1130 		.pvr_value		= 0x51510000,
1131 		.cpu_name		= "STBx25xx",
1132 		.cpu_features		= CPU_FTRS_40X,
1133 		.cpu_user_features	= PPC_FEATURE_32 |
1134 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1135 		.icache_bsize		= 32,
1136 		.dcache_bsize		= 32,
1137 		.machine_check		= machine_check_4xx,
1138 		.platform		= "ppc405",
1139 	},
1140 	{	/* 405LP */
1141 		.pvr_mask		= 0xffff0000,
1142 		.pvr_value		= 0x41F10000,
1143 		.cpu_name		= "405LP",
1144 		.cpu_features		= CPU_FTRS_40X,
1145 		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1146 		.icache_bsize		= 32,
1147 		.dcache_bsize		= 32,
1148 		.machine_check		= machine_check_4xx,
1149 		.platform		= "ppc405",
1150 	},
1151 	{	/* Xilinx Virtex-II Pro  */
1152 		.pvr_mask		= 0xfffff000,
1153 		.pvr_value		= 0x20010000,
1154 		.cpu_name		= "Virtex-II Pro",
1155 		.cpu_features		= CPU_FTRS_40X,
1156 		.cpu_user_features	= PPC_FEATURE_32 |
1157 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1158 		.icache_bsize		= 32,
1159 		.dcache_bsize		= 32,
1160 		.machine_check		= machine_check_4xx,
1161 		.platform		= "ppc405",
1162 	},
1163 	{	/* Xilinx Virtex-4 FX */
1164 		.pvr_mask		= 0xfffff000,
1165 		.pvr_value		= 0x20011000,
1166 		.cpu_name		= "Virtex-4 FX",
1167 		.cpu_features		= CPU_FTRS_40X,
1168 		.cpu_user_features	= PPC_FEATURE_32 |
1169 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1170 		.icache_bsize		= 32,
1171 		.dcache_bsize		= 32,
1172 		.machine_check		= machine_check_4xx,
1173 		.platform		= "ppc405",
1174 	},
1175 	{	/* 405EP */
1176 		.pvr_mask		= 0xffff0000,
1177 		.pvr_value		= 0x51210000,
1178 		.cpu_name		= "405EP",
1179 		.cpu_features		= CPU_FTRS_40X,
1180 		.cpu_user_features	= PPC_FEATURE_32 |
1181 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1182 		.icache_bsize		= 32,
1183 		.dcache_bsize		= 32,
1184 		.machine_check		= machine_check_4xx,
1185 		.platform		= "ppc405",
1186 	},
1187 	{	/* 405EX */
1188 		.pvr_mask		= 0xffff0004,
1189 		.pvr_value		= 0x12910004,
1190 		.cpu_name		= "405EX",
1191 		.cpu_features		= CPU_FTRS_40X,
1192 		.cpu_user_features	= PPC_FEATURE_32 |
1193 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1194 		.icache_bsize		= 32,
1195 		.dcache_bsize		= 32,
1196 		.machine_check		= machine_check_4xx,
1197 		.platform		= "ppc405",
1198 	},
1199 	{	/* 405EXr */
1200 		.pvr_mask		= 0xffff0004,
1201 		.pvr_value		= 0x12910000,
1202 		.cpu_name		= "405EXr",
1203 		.cpu_features		= CPU_FTRS_40X,
1204 		.cpu_user_features	= PPC_FEATURE_32 |
1205 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1206 		.icache_bsize		= 32,
1207 		.dcache_bsize		= 32,
1208 		.machine_check		= machine_check_4xx,
1209 		.platform		= "ppc405",
1210 	},
1211 	{	/* default match */
1212 		.pvr_mask		= 0x00000000,
1213 		.pvr_value		= 0x00000000,
1214 		.cpu_name		= "(generic 40x PPC)",
1215 		.cpu_features		= CPU_FTRS_40X,
1216 		.cpu_user_features	= PPC_FEATURE_32 |
1217 			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1218 		.icache_bsize		= 32,
1219 		.dcache_bsize		= 32,
1220 		.machine_check		= machine_check_4xx,
1221 		.platform		= "ppc405",
1222 	}
1223 
1224 #endif /* CONFIG_40x */
1225 #ifdef CONFIG_44x
1226 	{
1227 		.pvr_mask		= 0xf0000fff,
1228 		.pvr_value		= 0x40000850,
1229 		.cpu_name		= "440GR Rev. A",
1230 		.cpu_features		= CPU_FTRS_44X,
1231 		.cpu_user_features	= COMMON_USER_BOOKE,
1232 		.icache_bsize		= 32,
1233 		.dcache_bsize		= 32,
1234 		.machine_check		= machine_check_4xx,
1235 		.platform		= "ppc440",
1236 	},
1237 	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1238 		.pvr_mask		= 0xf0000fff,
1239 		.pvr_value		= 0x40000858,
1240 		.cpu_name		= "440EP Rev. A",
1241 		.cpu_features		= CPU_FTRS_44X,
1242 		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1243 		.icache_bsize		= 32,
1244 		.dcache_bsize		= 32,
1245 		.cpu_setup		= __setup_cpu_440ep,
1246 		.machine_check		= machine_check_4xx,
1247 		.platform		= "ppc440",
1248 	},
1249 	{
1250 		.pvr_mask		= 0xf0000fff,
1251 		.pvr_value		= 0x400008d3,
1252 		.cpu_name		= "440GR Rev. B",
1253 		.cpu_features		= CPU_FTRS_44X,
1254 		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1255 		.icache_bsize		= 32,
1256 		.dcache_bsize		= 32,
1257 		.machine_check		= machine_check_4xx,
1258 		.platform		= "ppc440",
1259 	},
1260 	{ /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1261 		.pvr_mask		= 0xf0000ff7,
1262 		.pvr_value		= 0x400008d4,
1263 		.cpu_name		= "440EP Rev. C",
1264 		.cpu_features		= CPU_FTRS_44X,
1265 		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1266 		.icache_bsize		= 32,
1267 		.dcache_bsize		= 32,
1268 		.cpu_setup		= __setup_cpu_440ep,
1269 		.machine_check		= machine_check_4xx,
1270 		.platform		= "ppc440",
1271 	},
1272 	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1273 		.pvr_mask		= 0xf0000fff,
1274 		.pvr_value		= 0x400008db,
1275 		.cpu_name		= "440EP Rev. B",
1276 		.cpu_features		= CPU_FTRS_44X,
1277 		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1278 		.icache_bsize		= 32,
1279 		.dcache_bsize		= 32,
1280 		.cpu_setup		= __setup_cpu_440ep,
1281 		.machine_check		= machine_check_4xx,
1282 		.platform		= "ppc440",
1283 	},
1284 	{ /* 440GRX */
1285 		.pvr_mask		= 0xf0000ffb,
1286 		.pvr_value		= 0x200008D0,
1287 		.cpu_name		= "440GRX",
1288 		.cpu_features		= CPU_FTRS_44X,
1289 		.cpu_user_features	= COMMON_USER_BOOKE,
1290 		.icache_bsize		= 32,
1291 		.dcache_bsize		= 32,
1292 		.cpu_setup		= __setup_cpu_440grx,
1293 		.machine_check		= machine_check_440A,
1294 		.platform		= "ppc440",
1295 	},
1296 	{ /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1297 		.pvr_mask		= 0xf0000ffb,
1298 		.pvr_value		= 0x200008D8,
1299 		.cpu_name		= "440EPX",
1300 		.cpu_features		= CPU_FTRS_44X,
1301 		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1302 		.icache_bsize		= 32,
1303 		.dcache_bsize		= 32,
1304 		.cpu_setup		= __setup_cpu_440epx,
1305 		.machine_check		= machine_check_440A,
1306 		.platform		= "ppc440",
1307 	},
1308 	{	/* 440GP Rev. B */
1309 		.pvr_mask		= 0xf0000fff,
1310 		.pvr_value		= 0x40000440,
1311 		.cpu_name		= "440GP Rev. B",
1312 		.cpu_features		= CPU_FTRS_44X,
1313 		.cpu_user_features	= COMMON_USER_BOOKE,
1314 		.icache_bsize		= 32,
1315 		.dcache_bsize		= 32,
1316 		.machine_check		= machine_check_4xx,
1317 		.platform		= "ppc440gp",
1318 	},
1319 	{	/* 440GP Rev. C */
1320 		.pvr_mask		= 0xf0000fff,
1321 		.pvr_value		= 0x40000481,
1322 		.cpu_name		= "440GP Rev. C",
1323 		.cpu_features		= CPU_FTRS_44X,
1324 		.cpu_user_features	= COMMON_USER_BOOKE,
1325 		.icache_bsize		= 32,
1326 		.dcache_bsize		= 32,
1327 		.machine_check		= machine_check_4xx,
1328 		.platform		= "ppc440gp",
1329 	},
1330 	{ /* 440GX Rev. A */
1331 		.pvr_mask		= 0xf0000fff,
1332 		.pvr_value		= 0x50000850,
1333 		.cpu_name		= "440GX Rev. A",
1334 		.cpu_features		= CPU_FTRS_44X,
1335 		.cpu_user_features	= COMMON_USER_BOOKE,
1336 		.icache_bsize		= 32,
1337 		.dcache_bsize		= 32,
1338 		.cpu_setup		= __setup_cpu_440gx,
1339 		.machine_check		= machine_check_440A,
1340 		.platform		= "ppc440",
1341 	},
1342 	{ /* 440GX Rev. B */
1343 		.pvr_mask		= 0xf0000fff,
1344 		.pvr_value		= 0x50000851,
1345 		.cpu_name		= "440GX Rev. B",
1346 		.cpu_features		= CPU_FTRS_44X,
1347 		.cpu_user_features	= COMMON_USER_BOOKE,
1348 		.icache_bsize		= 32,
1349 		.dcache_bsize		= 32,
1350 		.cpu_setup		= __setup_cpu_440gx,
1351 		.machine_check		= machine_check_440A,
1352 		.platform		= "ppc440",
1353 	},
1354 	{ /* 440GX Rev. C */
1355 		.pvr_mask		= 0xf0000fff,
1356 		.pvr_value		= 0x50000892,
1357 		.cpu_name		= "440GX Rev. C",
1358 		.cpu_features		= CPU_FTRS_44X,
1359 		.cpu_user_features	= COMMON_USER_BOOKE,
1360 		.icache_bsize		= 32,
1361 		.dcache_bsize		= 32,
1362 		.cpu_setup		= __setup_cpu_440gx,
1363 		.machine_check		= machine_check_440A,
1364 		.platform		= "ppc440",
1365 	},
1366 	{ /* 440GX Rev. F */
1367 		.pvr_mask		= 0xf0000fff,
1368 		.pvr_value		= 0x50000894,
1369 		.cpu_name		= "440GX Rev. F",
1370 		.cpu_features		= CPU_FTRS_44X,
1371 		.cpu_user_features	= COMMON_USER_BOOKE,
1372 		.icache_bsize		= 32,
1373 		.dcache_bsize		= 32,
1374 		.cpu_setup		= __setup_cpu_440gx,
1375 		.machine_check		= machine_check_440A,
1376 		.platform		= "ppc440",
1377 	},
1378 	{ /* 440SP Rev. A */
1379 		.pvr_mask		= 0xfff00fff,
1380 		.pvr_value		= 0x53200891,
1381 		.cpu_name		= "440SP Rev. A",
1382 		.cpu_features		= CPU_FTRS_44X,
1383 		.cpu_user_features	= COMMON_USER_BOOKE,
1384 		.icache_bsize		= 32,
1385 		.dcache_bsize		= 32,
1386 		.machine_check		= machine_check_4xx,
1387 		.platform		= "ppc440",
1388 	},
1389 	{ /* 440SPe Rev. A */
1390 		.pvr_mask               = 0xfff00fff,
1391 		.pvr_value              = 0x53400890,
1392 		.cpu_name               = "440SPe Rev. A",
1393 		.cpu_features		= CPU_FTRS_44X,
1394 		.cpu_user_features      = COMMON_USER_BOOKE,
1395 		.icache_bsize           = 32,
1396 		.dcache_bsize           = 32,
1397 		.cpu_setup		= __setup_cpu_440spe,
1398 		.machine_check		= machine_check_440A,
1399 		.platform               = "ppc440",
1400 	},
1401 	{ /* 440SPe Rev. B */
1402 		.pvr_mask		= 0xfff00fff,
1403 		.pvr_value		= 0x53400891,
1404 		.cpu_name		= "440SPe Rev. B",
1405 		.cpu_features		= CPU_FTRS_44X,
1406 		.cpu_user_features	= COMMON_USER_BOOKE,
1407 		.icache_bsize		= 32,
1408 		.dcache_bsize		= 32,
1409 		.cpu_setup		= __setup_cpu_440spe,
1410 		.machine_check		= machine_check_440A,
1411 		.platform		= "ppc440",
1412 	},
1413 	{ /* 460EX */
1414 		.pvr_mask		= 0xffff0002,
1415 		.pvr_value		= 0x13020002,
1416 		.cpu_name		= "460EX",
1417 		.cpu_features		= CPU_FTRS_44X,
1418 		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1419 		.icache_bsize		= 32,
1420 		.dcache_bsize		= 32,
1421 		.cpu_setup		= __setup_cpu_460ex,
1422 		.machine_check		= machine_check_440A,
1423 		.platform		= "ppc440",
1424 	},
1425 	{ /* 460GT */
1426 		.pvr_mask		= 0xffff0002,
1427 		.pvr_value		= 0x13020000,
1428 		.cpu_name		= "460GT",
1429 		.cpu_features		= CPU_FTRS_44X,
1430 		.cpu_user_features	= COMMON_USER_BOOKE,
1431 		.icache_bsize		= 32,
1432 		.dcache_bsize		= 32,
1433 		.machine_check		= machine_check_440A,
1434 		.platform		= "ppc440",
1435 	},
1436 	{	/* default match */
1437 		.pvr_mask		= 0x00000000,
1438 		.pvr_value		= 0x00000000,
1439 		.cpu_name		= "(generic 44x PPC)",
1440 		.cpu_features		= CPU_FTRS_44X,
1441 		.cpu_user_features	= COMMON_USER_BOOKE,
1442 		.icache_bsize		= 32,
1443 		.dcache_bsize		= 32,
1444 		.machine_check		= machine_check_4xx,
1445 		.platform		= "ppc440",
1446 	}
1447 #endif /* CONFIG_44x */
1448 #ifdef CONFIG_E200
1449 	{	/* e200z5 */
1450 		.pvr_mask		= 0xfff00000,
1451 		.pvr_value		= 0x81000000,
1452 		.cpu_name		= "e200z5",
1453 		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1454 		.cpu_features		= CPU_FTRS_E200,
1455 		.cpu_user_features	= COMMON_USER_BOOKE |
1456 			PPC_FEATURE_HAS_EFP_SINGLE |
1457 			PPC_FEATURE_UNIFIED_CACHE,
1458 		.dcache_bsize		= 32,
1459 		.machine_check		= machine_check_e200,
1460 		.platform		= "ppc5554",
1461 	},
1462 	{	/* e200z6 */
1463 		.pvr_mask		= 0xfff00000,
1464 		.pvr_value		= 0x81100000,
1465 		.cpu_name		= "e200z6",
1466 		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1467 		.cpu_features		= CPU_FTRS_E200,
1468 		.cpu_user_features	= COMMON_USER_BOOKE |
1469 			PPC_FEATURE_HAS_SPE_COMP |
1470 			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1471 			PPC_FEATURE_UNIFIED_CACHE,
1472 		.dcache_bsize		= 32,
1473 		.machine_check		= machine_check_e200,
1474 		.platform		= "ppc5554",
1475 	},
1476 	{	/* default match */
1477 		.pvr_mask		= 0x00000000,
1478 		.pvr_value		= 0x00000000,
1479 		.cpu_name		= "(generic E200 PPC)",
1480 		.cpu_features		= CPU_FTRS_E200,
1481 		.cpu_user_features	= COMMON_USER_BOOKE |
1482 			PPC_FEATURE_HAS_EFP_SINGLE |
1483 			PPC_FEATURE_UNIFIED_CACHE,
1484 		.dcache_bsize		= 32,
1485 		.machine_check		= machine_check_e200,
1486 		.platform		= "ppc5554",
1487 	}
1488 #endif /* CONFIG_E200 */
1489 #ifdef CONFIG_E500
1490 	{	/* e500 */
1491 		.pvr_mask		= 0xffff0000,
1492 		.pvr_value		= 0x80200000,
1493 		.cpu_name		= "e500",
1494 		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1495 		.cpu_features		= CPU_FTRS_E500,
1496 		.cpu_user_features	= COMMON_USER_BOOKE |
1497 			PPC_FEATURE_HAS_SPE_COMP |
1498 			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1499 		.icache_bsize		= 32,
1500 		.dcache_bsize		= 32,
1501 		.num_pmcs		= 4,
1502 		.oprofile_cpu_type	= "ppc/e500",
1503 		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1504 		.machine_check		= machine_check_e500,
1505 		.platform		= "ppc8540",
1506 	},
1507 	{	/* e500v2 */
1508 		.pvr_mask		= 0xffff0000,
1509 		.pvr_value		= 0x80210000,
1510 		.cpu_name		= "e500v2",
1511 		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1512 		.cpu_features		= CPU_FTRS_E500_2,
1513 		.cpu_user_features	= COMMON_USER_BOOKE |
1514 			PPC_FEATURE_HAS_SPE_COMP |
1515 			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1516 			PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1517 		.icache_bsize		= 32,
1518 		.dcache_bsize		= 32,
1519 		.num_pmcs		= 4,
1520 		.oprofile_cpu_type	= "ppc/e500",
1521 		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1522 		.machine_check		= machine_check_e500,
1523 		.platform		= "ppc8548",
1524 	},
1525 	{	/* default match */
1526 		.pvr_mask		= 0x00000000,
1527 		.pvr_value		= 0x00000000,
1528 		.cpu_name		= "(generic E500 PPC)",
1529 		.cpu_features		= CPU_FTRS_E500,
1530 		.cpu_user_features	= COMMON_USER_BOOKE |
1531 			PPC_FEATURE_HAS_SPE_COMP |
1532 			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1533 		.icache_bsize		= 32,
1534 		.dcache_bsize		= 32,
1535 		.machine_check		= machine_check_e500,
1536 		.platform		= "powerpc",
1537 	}
1538 #endif /* CONFIG_E500 */
1539 #endif /* CONFIG_PPC32 */
1540 };
1541 
1542 static struct cpu_spec the_cpu_spec;
1543 
1544 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1545 {
1546 	struct cpu_spec *s = cpu_specs;
1547 	struct cpu_spec *t = &the_cpu_spec;
1548 	int i;
1549 
1550 	s = PTRRELOC(s);
1551 	t = PTRRELOC(t);
1552 
1553 	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1554 		if ((pvr & s->pvr_mask) == s->pvr_value) {
1555 			/*
1556 			 * If we are overriding a previous value derived
1557 			 * from the real PVR with a new value obtained
1558 			 * using a logical PVR value, don't modify the
1559 			 * performance monitor fields.
1560 			 */
1561 			if (t->num_pmcs && !s->num_pmcs) {
1562 				t->cpu_name = s->cpu_name;
1563 				t->cpu_features = s->cpu_features;
1564 				t->cpu_user_features = s->cpu_user_features;
1565 				t->icache_bsize = s->icache_bsize;
1566 				t->dcache_bsize = s->dcache_bsize;
1567 				t->cpu_setup = s->cpu_setup;
1568 				t->cpu_restore = s->cpu_restore;
1569 				t->platform = s->platform;
1570 			} else
1571 				*t = *s;
1572 			*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1573 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1574 			/* ppc64 and booke expect identify_cpu to also call
1575 			 * setup_cpu for that processor. I will consolidate
1576 			 * that at a later time, for now, just use #ifdef.
1577 			 * we also don't need to PTRRELOC the function pointer
1578 			 * on ppc64 and booke as we are running at 0 in real
1579 			 * mode on ppc64 and reloc_offset is always 0 on booke.
1580 			 */
1581 			if (s->cpu_setup) {
1582 				s->cpu_setup(offset, s);
1583 			}
1584 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1585 			return s;
1586 		}
1587 	BUG();
1588 	return NULL;
1589 }
1590 
1591 void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1592 {
1593 	struct fixup_entry {
1594 		unsigned long	mask;
1595 		unsigned long	value;
1596 		long		start_off;
1597 		long		end_off;
1598 	} *fcur, *fend;
1599 
1600 	fcur = fixup_start;
1601 	fend = fixup_end;
1602 
1603 	for (; fcur < fend; fcur++) {
1604 		unsigned int *pstart, *pend, *p;
1605 
1606 		if ((value & fcur->mask) == fcur->value)
1607 			continue;
1608 
1609 		/* These PTRRELOCs will disappear once the new scheme for
1610 		 * modules and vdso is implemented
1611 		 */
1612 		pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1613 		pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1614 
1615 		for (p = pstart; p < pend; p++) {
1616 			*p = 0x60000000u;
1617 			asm volatile ("dcbst 0, %0" : : "r" (p));
1618 		}
1619 		asm volatile ("sync" : : : "memory");
1620 		for (p = pstart; p < pend; p++)
1621 			asm volatile ("icbi 0,%0" : : "r" (p));
1622 		asm volatile ("sync; isync" : : : "memory");
1623 	}
1624 }
1625