cputable.c 49.0 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3
/*
 *  Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
 *
S
Stephen Rothwell 已提交
4 5 6
 *  Modifications for ppc64:
 *      Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
 *
L
Linus Torvalds 已提交
7 8 9 10 11 12 13 14 15 16
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version
 *  2 of the License, or (at your option) any later version.
 */

#include <linux/string.h>
#include <linux/sched.h>
#include <linux/threads.h>
#include <linux/init.h>
17 18 19
#include <linux/module.h>

#include <asm/oprofile_impl.h>
L
Linus Torvalds 已提交
20
#include <asm/cputable.h>
21
#include <asm/prom.h>		/* for PTRRELOC on ARCH=ppc */
L
Linus Torvalds 已提交
22

23
struct cpu_spec* cur_cpu_spec = NULL;
S
Stephen Rothwell 已提交
24
EXPORT_SYMBOL(cur_cpu_spec);
L
Linus Torvalds 已提交
25

S
Stephen Rothwell 已提交
26 27 28 29 30 31 32
/* NOTE:
 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
 * the responsibility of the appropriate CPU save/restore functions to
 * eventually copy these settings over. Those save/restore aren't yet
 * part of the cputable though. That has to be fixed for both ppc32
 * and ppc64
 */
33
#ifdef CONFIG_PPC32
34 35
extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
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_460gt(unsigned long offset, struct cpu_spec* spec);
41 42 43 44 45 46 47 48
extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
49
#endif /* CONFIG_PPC32 */
O
Olof Johansson 已提交
50
#ifdef CONFIG_PPC64
51
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
52
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
O
Olof Johansson 已提交
53
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
54
extern void __restore_cpu_pa6t(void);
O
Olof Johansson 已提交
55
extern void __restore_cpu_ppc970(void);
56 57
extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
extern void __restore_cpu_power7(void);
O
Olof Johansson 已提交
58
#endif /* CONFIG_PPC64 */
L
Linus Torvalds 已提交
59 60 61 62

/* This table only contains "desktop" CPUs, it need to be filled with embedded
 * ones as well...
 */
S
Stephen Rothwell 已提交
63 64 65
#define COMMON_USER		(PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
				 PPC_FEATURE_HAS_MMU)
#define COMMON_USER_PPC64	(COMMON_USER | PPC_FEATURE_64)
66
#define COMMON_USER_POWER4	(COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
67 68 69 70
#define COMMON_USER_POWER5	(COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
#define COMMON_USER_POWER5_PLUS	(COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
71
#define COMMON_USER_POWER6	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
72
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
73 74
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
75 76
#define COMMON_USER_POWER7	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
77 78
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
79 80 81
#define COMMON_USER_PA6T	(COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_HAS_ALTIVEC_COMP)
82 83
#define COMMON_USER_BOOKE	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
				 PPC_FEATURE_BOOKE)
L
Linus Torvalds 已提交
84

85
static struct cpu_spec __initdata cpu_specs[] = {
S
Stephen Rothwell 已提交
86 87 88 89 90 91
#ifdef CONFIG_PPC64
	{	/* Power3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00400000,
		.cpu_name		= "POWER3 (630)",
		.cpu_features		= CPU_FTRS_POWER3,
92
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
S
Stephen Rothwell 已提交
93 94 95
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
96
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
97
		.oprofile_cpu_type	= "ppc64/power3",
98
		.oprofile_type		= PPC_OPROFILE_RS64,
99
		.machine_check		= machine_check_generic,
100
		.platform		= "power3",
S
Stephen Rothwell 已提交
101 102 103 104 105 106
	},
	{	/* Power3+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00410000,
		.cpu_name		= "POWER3 (630+)",
		.cpu_features		= CPU_FTRS_POWER3,
107
		.cpu_user_features	= COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
S
Stephen Rothwell 已提交
108 109 110
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
111
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
112
		.oprofile_cpu_type	= "ppc64/power3",
113
		.oprofile_type		= PPC_OPROFILE_RS64,
114
		.machine_check		= machine_check_generic,
115
		.platform		= "power3",
S
Stephen Rothwell 已提交
116 117 118 119 120 121 122 123 124 125
	},
	{	/* Northstar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00330000,
		.cpu_name		= "RS64-II (northstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
126
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
127
		.oprofile_cpu_type	= "ppc64/rs64",
128
		.oprofile_type		= PPC_OPROFILE_RS64,
129
		.machine_check		= machine_check_generic,
130
		.platform		= "rs64",
S
Stephen Rothwell 已提交
131 132 133 134 135 136 137 138 139 140
	},
	{	/* Pulsar */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00340000,
		.cpu_name		= "RS64-III (pulsar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
141
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
142
		.oprofile_cpu_type	= "ppc64/rs64",
143
		.oprofile_type		= PPC_OPROFILE_RS64,
144
		.machine_check		= machine_check_generic,
145
		.platform		= "rs64",
S
Stephen Rothwell 已提交
146 147 148 149 150 151 152 153 154 155
	},
	{	/* I-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00360000,
		.cpu_name		= "RS64-III (icestar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
156
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
157
		.oprofile_cpu_type	= "ppc64/rs64",
158
		.oprofile_type		= PPC_OPROFILE_RS64,
159
		.machine_check		= machine_check_generic,
160
		.platform		= "rs64",
S
Stephen Rothwell 已提交
161 162 163 164 165 166 167 168 169 170
	},
	{	/* S-star */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00370000,
		.cpu_name		= "RS64-IV (sstar)",
		.cpu_features		= CPU_FTRS_RS64,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
171
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
172
		.oprofile_cpu_type	= "ppc64/rs64",
173
		.oprofile_type		= PPC_OPROFILE_RS64,
174
		.machine_check		= machine_check_generic,
175
		.platform		= "rs64",
S
Stephen Rothwell 已提交
176 177 178 179 180 181
	},
	{	/* Power4 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00350000,
		.cpu_name		= "POWER4 (gp)",
		.cpu_features		= CPU_FTRS_POWER4,
182
		.cpu_user_features	= COMMON_USER_POWER4,
S
Stephen Rothwell 已提交
183 184 185
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
186
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
187
		.oprofile_cpu_type	= "ppc64/power4",
188
		.oprofile_type		= PPC_OPROFILE_POWER4,
189
		.machine_check		= machine_check_generic,
190
		.platform		= "power4",
S
Stephen Rothwell 已提交
191 192 193 194 195 196
	},
	{	/* Power4+ */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00380000,
		.cpu_name		= "POWER4+ (gq)",
		.cpu_features		= CPU_FTRS_POWER4,
197
		.cpu_user_features	= COMMON_USER_POWER4,
S
Stephen Rothwell 已提交
198 199 200
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
201
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
202
		.oprofile_cpu_type	= "ppc64/power4",
203
		.oprofile_type		= PPC_OPROFILE_POWER4,
204
		.machine_check		= machine_check_generic,
205
		.platform		= "power4",
S
Stephen Rothwell 已提交
206 207 208 209 210 211
	},
	{	/* PPC970 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00390000,
		.cpu_name		= "PPC970",
		.cpu_features		= CPU_FTRS_PPC970,
212
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
213 214 215 216
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
217
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
218
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
219
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
220
		.oprofile_cpu_type	= "ppc64/970",
221
		.oprofile_type		= PPC_OPROFILE_POWER4,
222
		.machine_check		= machine_check_generic,
223
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
224 225 226 227 228 229
	},
	{	/* PPC970FX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003c0000,
		.cpu_name		= "PPC970FX",
		.cpu_features		= CPU_FTRS_PPC970,
230
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
231 232 233 234
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
235
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
236
		.cpu_setup		= __setup_cpu_ppc970,
O
Olof Johansson 已提交
237
		.cpu_restore		= __restore_cpu_ppc970,
S
Stephen Rothwell 已提交
238
		.oprofile_cpu_type	= "ppc64/970",
239
		.oprofile_type		= PPC_OPROFILE_POWER4,
240
		.machine_check		= machine_check_generic,
241
		.platform		= "ppc970",
242 243 244 245 246 247 248 249 250 251 252
	},
	{	/* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00440100,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
253
		.pmc_type		= PPC_PMC_IBM,
254 255 256 257
		.cpu_setup		= __setup_cpu_ppc970,
		.cpu_restore		= __restore_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970MP",
		.oprofile_type		= PPC_OPROFILE_POWER4,
258
		.machine_check		= machine_check_generic,
259
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
260 261 262 263 264 265
	},
	{	/* PPC970MP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00440000,
		.cpu_name		= "PPC970MP",
		.cpu_features		= CPU_FTRS_PPC970,
266
		.cpu_user_features	= COMMON_USER_POWER4 |
S
Stephen Rothwell 已提交
267 268 269
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
270
		.num_pmcs		= 8,
271
		.pmc_type		= PPC_PMC_IBM,
272
		.cpu_setup		= __setup_cpu_ppc970MP,
O
Olof Johansson 已提交
273
		.cpu_restore		= __restore_cpu_ppc970,
274
		.oprofile_cpu_type	= "ppc64/970MP",
275
		.oprofile_type		= PPC_OPROFILE_POWER4,
276
		.machine_check		= machine_check_generic,
277
		.platform		= "ppc970",
S
Stephen Rothwell 已提交
278
	},
J
Jake Moilanen 已提交
279 280 281 282 283 284 285 286 287 288
	{	/* PPC970GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00450000,
		.cpu_name		= "PPC970GX",
		.cpu_features		= CPU_FTRS_PPC970,
		.cpu_user_features	= COMMON_USER_POWER4 |
			PPC_FEATURE_HAS_ALTIVEC_COMP,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 8,
289
		.pmc_type		= PPC_PMC_IBM,
J
Jake Moilanen 已提交
290 291 292
		.cpu_setup		= __setup_cpu_ppc970,
		.oprofile_cpu_type	= "ppc64/970",
		.oprofile_type		= PPC_OPROFILE_POWER4,
293
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
294 295
		.platform		= "ppc970",
	},
296
	{	/* Power5 GR */
S
Stephen Rothwell 已提交
297 298 299 300
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003a0000,
		.cpu_name		= "POWER5 (gr)",
		.cpu_features		= CPU_FTRS_POWER5,
301
		.cpu_user_features	= COMMON_USER_POWER5,
S
Stephen Rothwell 已提交
302 303 304
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
305
		.pmc_type		= PPC_PMC_IBM,
S
Stephen Rothwell 已提交
306
		.oprofile_cpu_type	= "ppc64/power5",
307
		.oprofile_type		= PPC_OPROFILE_POWER4,
308 309 310 311 312
		/* SIHV / SIPR bits are implemented on POWER4+ (GQ)
		 * and above but only works on POWER5 and above
		 */
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
313
		.machine_check		= machine_check_generic,
314
		.platform		= "power5",
S
Stephen Rothwell 已提交
315
	},
316 317 318 319 320 321 322 323 324 325 326 327 328
	{	/* Power5++ */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x003b0300,
		.cpu_name		= "POWER5+ (gs)",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.oprofile_cpu_type	= "ppc64/power5++",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
329
		.machine_check		= machine_check_generic,
330 331
		.platform		= "power5+",
	},
332
	{	/* Power5 GS */
S
Stephen Rothwell 已提交
333 334
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003b0000,
335
		.cpu_name		= "POWER5+ (gs)",
S
Stephen Rothwell 已提交
336
		.cpu_features		= CPU_FTRS_POWER5,
337
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
S
Stephen Rothwell 已提交
338 339 340
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
341
		.pmc_type		= PPC_PMC_IBM,
342
		.oprofile_cpu_type	= "ppc64/power5+",
343
		.oprofile_type		= PPC_OPROFILE_POWER4,
344 345
		.oprofile_mmcra_sihv	= MMCRA_SIHV,
		.oprofile_mmcra_sipr	= MMCRA_SIPR,
346
		.machine_check		= machine_check_generic,
347
		.platform		= "power5+",
S
Stephen Rothwell 已提交
348
	},
349 350 351 352 353 354 355 356
	{	/* POWER6 in P5+ mode; 2.04-compliant processor */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000001,
		.cpu_name		= "POWER5+",
		.cpu_features		= CPU_FTRS_POWER5,
		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
357
		.machine_check		= machine_check_generic,
358
		.oprofile_cpu_type	= "ppc64/compat-power5+",
359 360
		.platform		= "power5+",
	},
361 362 363
	{	/* Power6 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003e0000,
364 365 366 367 368 369 370
		.cpu_name		= "POWER6 (raw)",
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6 |
			PPC_FEATURE_POWER6_EXT,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
371
		.pmc_type		= PPC_PMC_IBM,
372 373 374 375 376 377
		.oprofile_cpu_type	= "ppc64/power6",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= POWER6_MMCRA_SIHV,
		.oprofile_mmcra_sipr	= POWER6_MMCRA_SIPR,
		.oprofile_mmcra_clear	= POWER6_MMCRA_THRM |
			POWER6_MMCRA_OTHER,
378
		.machine_check		= machine_check_generic,
379 380 381 382 383 384
		.platform		= "power6x",
	},
	{	/* 2.05-compliant processor, i.e. Power6 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000002,
		.cpu_name		= "POWER6 (architected)",
385 386 387 388
		.cpu_features		= CPU_FTRS_POWER6,
		.cpu_user_features	= COMMON_USER_POWER6,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
389
		.machine_check		= machine_check_generic,
390
		.oprofile_cpu_type	= "ppc64/compat-power6",
391 392
		.platform		= "power6",
	},
393 394 395 396 397 398 399 400 401
	{	/* 2.06-compliant processor, i.e. Power7 "architected" mode */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x0f000003,
		.cpu_name		= "POWER7 (architected)",
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.machine_check		= machine_check_generic,
402
		.oprofile_cpu_type	= "ppc64/compat-power7",
403 404
		.platform		= "power7",
	},
405 406 407
	{	/* Power7 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x003f0000,
408
		.cpu_name		= "POWER7 (raw)",
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
		.cpu_features		= CPU_FTRS_POWER7,
		.cpu_user_features	= COMMON_USER_POWER7,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
		.pmc_type		= PPC_PMC_IBM,
		.cpu_setup		= __setup_cpu_power7,
		.cpu_restore		= __restore_cpu_power7,
		.oprofile_cpu_type	= "ppc64/power7",
		.oprofile_type		= PPC_OPROFILE_POWER4,
		.oprofile_mmcra_sihv	= POWER6_MMCRA_SIHV,
		.oprofile_mmcra_sipr	= POWER6_MMCRA_SIPR,
		.oprofile_mmcra_clear	= POWER6_MMCRA_THRM |
			POWER6_MMCRA_OTHER,
		.platform		= "power7",
	},
425
	{	/* Cell Broadband Engine */
S
Stephen Rothwell 已提交
426 427 428 429 430
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00700000,
		.cpu_name		= "Cell Broadband Engine",
		.cpu_features		= CPU_FTRS_CELL,
		.cpu_user_features	= COMMON_USER_PPC64 |
431 432
			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
			PPC_FEATURE_SMT,
S
Stephen Rothwell 已提交
433 434
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
435
		.num_pmcs		= 4,
436
		.pmc_type		= PPC_PMC_IBM,
437 438
		.oprofile_cpu_type	= "ppc64/cell-be",
		.oprofile_type		= PPC_OPROFILE_CELL,
439
		.machine_check		= machine_check_generic,
440
		.platform		= "ppc-cell-be",
S
Stephen Rothwell 已提交
441
	},
442 443 444 445 446 447 448 449 450
	{	/* PA Semi PA6T */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00900000,
		.cpu_name		= "PA6T",
		.cpu_features		= CPU_FTRS_PA6T,
		.cpu_user_features	= COMMON_USER_PA6T,
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 6,
451
		.pmc_type		= PPC_PMC_PA6T,
O
Olof Johansson 已提交
452 453
		.cpu_setup		= __setup_cpu_pa6t,
		.cpu_restore		= __restore_cpu_pa6t,
454 455
		.oprofile_cpu_type	= "ppc64/pa6t",
		.oprofile_type		= PPC_OPROFILE_PA6T,
456
		.machine_check		= machine_check_generic,
457 458
		.platform		= "pa6t",
	},
S
Stephen Rothwell 已提交
459 460 461 462 463 464 465 466 467
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "POWER4 (compatible)",
		.cpu_features		= CPU_FTRS_COMPATIBLE,
		.cpu_user_features	= COMMON_USER_PPC64,
		.icache_bsize		= 128,
		.dcache_bsize		= 128,
		.num_pmcs		= 6,
468
		.pmc_type		= PPC_PMC_IBM,
469
		.machine_check		= machine_check_generic,
470
		.platform		= "power4",
S
Stephen Rothwell 已提交
471 472 473
	}
#endif	/* CONFIG_PPC64 */
#ifdef CONFIG_PPC32
L
Linus Torvalds 已提交
474
#if CLASSIC_PPC
S
Stephen Rothwell 已提交
475
	{	/* 601 */
L
Linus Torvalds 已提交
476 477 478
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00010000,
		.cpu_name		= "601",
479
		.cpu_features		= CPU_FTRS_PPC601,
S
Stephen Rothwell 已提交
480
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_601_INSTR |
481
			PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
L
Linus Torvalds 已提交
482 483
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
484
		.machine_check		= machine_check_generic,
485
		.platform		= "ppc601",
L
Linus Torvalds 已提交
486 487 488 489 490
	},
	{	/* 603 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00030000,
		.cpu_name		= "603",
491
		.cpu_features		= CPU_FTRS_603,
492
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
493 494
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
495
		.cpu_setup		= __setup_cpu_603,
496
		.machine_check		= machine_check_generic,
497
		.platform		= "ppc603",
L
Linus Torvalds 已提交
498 499 500 501 502
	},
	{	/* 603e */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00060000,
		.cpu_name		= "603e",
503
		.cpu_features		= CPU_FTRS_603,
504
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
505 506
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
507
		.cpu_setup		= __setup_cpu_603,
508
		.machine_check		= machine_check_generic,
509
		.platform		= "ppc603",
L
Linus Torvalds 已提交
510 511 512 513 514
	},
	{	/* 603ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00070000,
		.cpu_name		= "603ev",
515
		.cpu_features		= CPU_FTRS_603,
516
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
517 518
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
519
		.cpu_setup		= __setup_cpu_603,
520
		.machine_check		= machine_check_generic,
521
		.platform		= "ppc603",
L
Linus Torvalds 已提交
522 523 524 525 526
	},
	{	/* 604 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00040000,
		.cpu_name		= "604",
527
		.cpu_features		= CPU_FTRS_604,
528
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
529 530 531
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 2,
532
		.cpu_setup		= __setup_cpu_604,
533
		.machine_check		= machine_check_generic,
534
		.platform		= "ppc604",
L
Linus Torvalds 已提交
535 536 537 538 539
	},
	{	/* 604e */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604e",
540
		.cpu_features		= CPU_FTRS_604,
541
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
542 543 544
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
545
		.cpu_setup		= __setup_cpu_604,
546
		.machine_check		= machine_check_generic,
547
		.platform		= "ppc604",
L
Linus Torvalds 已提交
548 549 550 551 552
	},
	{	/* 604r */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00090000,
		.cpu_name		= "604r",
553
		.cpu_features		= CPU_FTRS_604,
554
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
555 556 557
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
558
		.cpu_setup		= __setup_cpu_604,
559
		.machine_check		= machine_check_generic,
560
		.platform		= "ppc604",
L
Linus Torvalds 已提交
561 562 563 564 565
	},
	{	/* 604ev */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000a0000,
		.cpu_name		= "604ev",
566
		.cpu_features		= CPU_FTRS_604,
567
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
568 569 570
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
571
		.cpu_setup		= __setup_cpu_604,
572
		.machine_check		= machine_check_generic,
573
		.platform		= "ppc604",
L
Linus Torvalds 已提交
574 575 576 577 578
	},
	{	/* 740/750 (0x4202, don't support TAU ?) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00084202,
		.cpu_name		= "740/750",
579
		.cpu_features		= CPU_FTRS_740_NOTAU,
580
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
581 582 583
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
584
		.cpu_setup		= __setup_cpu_750,
585
		.machine_check		= machine_check_generic,
586
		.platform		= "ppc750",
L
Linus Torvalds 已提交
587 588 589 590 591
	},
	{	/* 750CX (80100 and 8010x?) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00080100,
		.cpu_name		= "750CX",
592
		.cpu_features		= CPU_FTRS_750,
593
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
594 595 596
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
597
		.cpu_setup		= __setup_cpu_750cx,
598
		.machine_check		= machine_check_generic,
599
		.platform		= "ppc750",
L
Linus Torvalds 已提交
600 601 602 603 604
	},
	{	/* 750CX (82201 and 82202) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082200,
		.cpu_name		= "750CX",
605
		.cpu_features		= CPU_FTRS_750,
606
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
607 608 609
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
610
		.cpu_setup		= __setup_cpu_750cx,
611
		.machine_check		= machine_check_generic,
612
		.platform		= "ppc750",
L
Linus Torvalds 已提交
613 614 615 616 617
	},
	{	/* 750CXe (82214) */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x00082210,
		.cpu_name		= "750CXe",
618
		.cpu_features		= CPU_FTRS_750,
619
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
620 621 622
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
623
		.cpu_setup		= __setup_cpu_750cx,
624
		.machine_check		= machine_check_generic,
625
		.platform		= "ppc750",
L
Linus Torvalds 已提交
626
	},
627 628 629 630
	{	/* 750CXe "Gekko" (83214) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x00083214,
		.cpu_name		= "750CXe",
631
		.cpu_features		= CPU_FTRS_750,
632
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
633 634 635
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
636
		.cpu_setup		= __setup_cpu_750cx,
637
		.machine_check		= machine_check_generic,
638
		.platform		= "ppc750",
639
	},
J
Jake Moilanen 已提交
640 641 642 643
	{	/* 750CL */
		.pvr_mask		= 0xfffff0f0,
		.pvr_value		= 0x00087010,
		.cpu_name		= "750CL",
644
		.cpu_features		= CPU_FTRS_750CL,
J
Jake Moilanen 已提交
645 646 647 648
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
649
		.cpu_setup		= __setup_cpu_750,
650
		.machine_check		= machine_check_generic,
J
Jake Moilanen 已提交
651 652
		.platform		= "ppc750",
	},
653 654 655 656
	{	/* 745/755 */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x00083000,
		.cpu_name		= "745/755",
657
		.cpu_features		= CPU_FTRS_750,
658
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
659 660 661
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
662
		.cpu_setup		= __setup_cpu_750,
663
		.machine_check		= machine_check_generic,
664
		.platform		= "ppc750",
665
	},
L
Linus Torvalds 已提交
666 667 668 669
	{	/* 750FX rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x70000100,
		.cpu_name		= "750FX",
670
		.cpu_features		= CPU_FTRS_750FX1,
671
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
672 673 674
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
675
		.cpu_setup		= __setup_cpu_750,
676
		.machine_check		= machine_check_generic,
677
		.platform		= "ppc750",
L
Linus Torvalds 已提交
678 679 680 681 682
	},
	{	/* 750FX rev 2.0 must disable HID0[DPM] */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x70000200,
		.cpu_name		= "750FX",
683
		.cpu_features		= CPU_FTRS_750FX2,
684
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
685 686 687
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
688
		.cpu_setup		= __setup_cpu_750,
689
		.machine_check		= machine_check_generic,
690
		.platform		= "ppc750",
L
Linus Torvalds 已提交
691 692 693 694 695
	},
	{	/* 750FX (All revs except 2.0) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70000000,
		.cpu_name		= "750FX",
696
		.cpu_features		= CPU_FTRS_750FX,
697
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
698 699 700
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
701
		.cpu_setup		= __setup_cpu_750fx,
702
		.machine_check		= machine_check_generic,
703
		.platform		= "ppc750",
L
Linus Torvalds 已提交
704 705 706 707 708
	},
	{	/* 750GX */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x70020000,
		.cpu_name		= "750GX",
709
		.cpu_features		= CPU_FTRS_750GX,
710
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
711 712 713
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
714
		.cpu_setup		= __setup_cpu_750fx,
715
		.machine_check		= machine_check_generic,
716
		.platform		= "ppc750",
L
Linus Torvalds 已提交
717 718 719 720 721
	},
	{	/* 740/750 (L2CR bit need fixup for 740) */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00080000,
		.cpu_name		= "740/750",
722
		.cpu_features		= CPU_FTRS_740,
723
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
724 725 726
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
727
		.cpu_setup		= __setup_cpu_750,
728
		.machine_check		= machine_check_generic,
729
		.platform		= "ppc750",
L
Linus Torvalds 已提交
730 731 732 733 734
	},
	{	/* 7400 rev 1.1 ? (no TAU) */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x000c1101,
		.cpu_name		= "7400 (1.1)",
735
		.cpu_features		= CPU_FTRS_7400_NOTAU,
736 737
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
738 739 740
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
741
		.cpu_setup		= __setup_cpu_7400,
742
		.machine_check		= machine_check_generic,
743
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
744 745 746 747 748
	},
	{	/* 7400 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x000c0000,
		.cpu_name		= "7400",
749
		.cpu_features		= CPU_FTRS_7400,
750 751
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
752 753 754
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
755
		.cpu_setup		= __setup_cpu_7400,
756
		.machine_check		= machine_check_generic,
757
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
758 759 760 761 762
	},
	{	/* 7410 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x800c0000,
		.cpu_name		= "7410",
763
		.cpu_features		= CPU_FTRS_7400,
764 765
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
766 767 768
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
769
		.cpu_setup		= __setup_cpu_7410,
770
		.machine_check		= machine_check_generic,
771
		.platform		= "ppc7400",
L
Linus Torvalds 已提交
772 773 774 775 776
	},
	{	/* 7450 2.0 - no doze/nap */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000200,
		.cpu_name		= "7450",
777
		.cpu_features		= CPU_FTRS_7450_20,
778 779
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
780 781 782
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
783 784
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
785
		.oprofile_type		= PPC_OPROFILE_G4,
786
		.machine_check		= machine_check_generic,
787
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
788 789 790 791 792
	},
	{	/* 7450 2.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80000201,
		.cpu_name		= "7450",
793
		.cpu_features		= CPU_FTRS_7450_21,
794 795
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
796 797 798
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
799 800
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
801
		.oprofile_type		= PPC_OPROFILE_G4,
802
		.machine_check		= machine_check_generic,
803
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
804 805 806 807 808
	},
	{	/* 7450 2.3 and newer */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80000000,
		.cpu_name		= "7450",
809
		.cpu_features		= CPU_FTRS_7450_23,
810 811
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
812 813 814
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
815 816
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
817
		.oprofile_type		= PPC_OPROFILE_G4,
818
		.machine_check		= machine_check_generic,
819
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
820 821 822 823 824
	},
	{	/* 7455 rev 1.x */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x80010100,
		.cpu_name		= "7455",
825
		.cpu_features		= CPU_FTRS_7455_1,
826 827
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
828 829 830
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
831 832
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
833
		.oprofile_type		= PPC_OPROFILE_G4,
834
		.machine_check		= machine_check_generic,
835
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
836 837 838 839 840
	},
	{	/* 7455 rev 2.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80010200,
		.cpu_name		= "7455",
841
		.cpu_features		= CPU_FTRS_7455_20,
842 843
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
844 845 846
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
847 848
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
849
		.oprofile_type		= PPC_OPROFILE_G4,
850
		.machine_check		= machine_check_generic,
851
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
852 853 854 855 856
	},
	{	/* 7455 others */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80010000,
		.cpu_name		= "7455",
857
		.cpu_features		= CPU_FTRS_7455,
858 859
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
860 861 862
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
863 864
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
865
		.oprofile_type		= PPC_OPROFILE_G4,
866
		.machine_check		= machine_check_generic,
867
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
868 869 870 871 872
	},
	{	/* 7447/7457 Rev 1.0 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020100,
		.cpu_name		= "7447/7457",
873
		.cpu_features		= CPU_FTRS_7447_10,
874 875
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
876 877 878
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
879 880
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
881
		.oprofile_type		= PPC_OPROFILE_G4,
882
		.machine_check		= machine_check_generic,
883
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
884 885 886 887 888
	},
	{	/* 7447/7457 Rev 1.1 */
		.pvr_mask		= 0xffffffff,
		.pvr_value		= 0x80020101,
		.cpu_name		= "7447/7457",
889
		.cpu_features		= CPU_FTRS_7447_10,
890 891
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
892 893 894
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
895 896
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
897
		.oprofile_type		= PPC_OPROFILE_G4,
898
		.machine_check		= machine_check_generic,
899
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
900 901 902 903 904
	},
	{	/* 7447/7457 Rev 1.2 and later */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80020000,
		.cpu_name		= "7447/7457",
905
		.cpu_features		= CPU_FTRS_7447,
906
		.cpu_user_features	= COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
907 908 909
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
910 911
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
912
		.oprofile_type		= PPC_OPROFILE_G4,
913
		.machine_check		= machine_check_generic,
914
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
915 916 917 918 919
	},
	{	/* 7447A */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80030000,
		.cpu_name		= "7447A",
920
		.cpu_features		= CPU_FTRS_7447A,
921 922
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
923 924 925
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
926 927
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
928
		.oprofile_type		= PPC_OPROFILE_G4,
929
		.machine_check		= machine_check_generic,
930
		.platform		= "ppc7450",
931 932 933 934 935
	},
	{	/* 7448 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80040000,
		.cpu_name		= "7448",
936
		.cpu_features		= CPU_FTRS_7448,
937 938
		.cpu_user_features	= COMMON_USER |
			PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
L
Linus Torvalds 已提交
939 940 941
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 6,
942 943
		.cpu_setup		= __setup_cpu_745x,
		.oprofile_cpu_type      = "ppc/7450",
944
		.oprofile_type		= PPC_OPROFILE_G4,
945
		.machine_check		= machine_check_generic,
946
		.platform		= "ppc7450",
L
Linus Torvalds 已提交
947 948 949 950 951
	},
	{	/* 82xx (8240, 8245, 8260 are all 603e cores) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00810000,
		.cpu_name		= "82xx",
952
		.cpu_features		= CPU_FTRS_82XX,
S
Stephen Rothwell 已提交
953
		.cpu_user_features	= COMMON_USER,
L
Linus Torvalds 已提交
954 955
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
956
		.cpu_setup		= __setup_cpu_603,
957
		.machine_check		= machine_check_generic,
958
		.platform		= "ppc603",
L
Linus Torvalds 已提交
959 960 961 962 963
	},
	{	/* All G2_LE (603e core, plus some) have the same pvr */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00820000,
		.cpu_name		= "G2_LE",
964
		.cpu_features		= CPU_FTRS_G2_LE,
S
Stephen Rothwell 已提交
965
		.cpu_user_features	= COMMON_USER,
L
Linus Torvalds 已提交
966 967
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
968
		.cpu_setup		= __setup_cpu_603,
969
		.machine_check		= machine_check_generic,
970
		.platform		= "ppc603",
L
Linus Torvalds 已提交
971
	},
972
	{	/* e300c1 (a 603e core, plus some) on 83xx */
L
Linus Torvalds 已提交
973 974
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00830000,
975
		.cpu_name		= "e300c1",
976
		.cpu_features		= CPU_FTRS_E300,
S
Stephen Rothwell 已提交
977
		.cpu_user_features	= COMMON_USER,
L
Linus Torvalds 已提交
978 979
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
980
		.cpu_setup		= __setup_cpu_603,
981
		.machine_check		= machine_check_generic,
982
		.platform		= "ppc603",
L
Linus Torvalds 已提交
983
	},
984 985 986 987
	{	/* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00840000,
		.cpu_name		= "e300c2",
988
		.cpu_features		= CPU_FTRS_E300C2,
989 990 991 992
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
993
		.machine_check		= machine_check_generic,
994 995
		.platform		= "ppc603",
	},
L
Li Yang 已提交
996
	{	/* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
997 998 999 1000 1001 1002 1003 1004
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00850000,
		.cpu_name		= "e300c3",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1005 1006 1007
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1008 1009
		.platform		= "ppc603",
	},
L
Li Yang 已提交
1010 1011 1012 1013 1014 1015 1016 1017 1018
	{	/* e300c4 (e300c1, plus one IU) */
		.pvr_mask		= 0x7fff0000,
		.pvr_value		= 0x00860000,
		.cpu_name		= "e300c4",
		.cpu_features		= CPU_FTRS_E300,
		.cpu_user_features	= COMMON_USER,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_603,
1019
		.machine_check		= machine_check_generic,
1020 1021 1022
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e300",
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
L
Li Yang 已提交
1023 1024
		.platform		= "ppc603",
	},
L
Linus Torvalds 已提交
1025 1026 1027 1028
	{	/* default match, we assume split I/D cache & TB (non-601)... */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic PPC)",
1029
		.cpu_features		= CPU_FTRS_CLASSIC32,
S
Stephen Rothwell 已提交
1030
		.cpu_user_features	= COMMON_USER,
L
Linus Torvalds 已提交
1031 1032
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1033
		.machine_check		= machine_check_generic,
1034
		.platform		= "ppc603",
L
Linus Torvalds 已提交
1035 1036 1037 1038 1039 1040 1041 1042 1043
	},
#endif /* CLASSIC_PPC */
#ifdef CONFIG_8xx
	{	/* 8xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00500000,
		.cpu_name		= "8xx",
		/* CPU_FTR_MAYBE_CAN_DOZE is possible,
		 * if the 8xx code is there.... */
1044
		.cpu_features		= CPU_FTRS_8XX,
L
Linus Torvalds 已提交
1045 1046 1047
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1048
		.platform		= "ppc823",
L
Linus Torvalds 已提交
1049 1050 1051 1052 1053 1054 1055
	},
#endif /* CONFIG_8xx */
#ifdef CONFIG_40x
	{	/* 403GC */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00200200,
		.cpu_name		= "403GC",
1056
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1057 1058 1059
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1060
		.machine_check		= machine_check_4xx,
1061
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1062 1063 1064 1065 1066
	},
	{	/* 403GCX */
		.pvr_mask		= 0xffffff00,
		.pvr_value		= 0x00201400,
		.cpu_name		= "403GCX",
1067
		.cpu_features		= CPU_FTRS_40X,
1068 1069
		.cpu_user_features	= PPC_FEATURE_32 |
		 	PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
L
Linus Torvalds 已提交
1070 1071
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1072
		.machine_check		= machine_check_4xx,
1073
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1074 1075 1076 1077 1078
	},
	{	/* 403G ?? */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x00200000,
		.cpu_name		= "403G ??",
1079
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1080 1081 1082
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 16,
		.dcache_bsize		= 16,
1083
		.machine_check		= machine_check_4xx,
1084
		.platform		= "ppc403",
L
Linus Torvalds 已提交
1085 1086 1087 1088 1089
	},
	{	/* 405GP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40110000,
		.cpu_name		= "405GP",
1090
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1091 1092 1093 1094
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1095
		.machine_check		= machine_check_4xx,
1096
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1097 1098 1099 1100 1101
	},
	{	/* STB 03xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40130000,
		.cpu_name		= "STB03xxx",
1102
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1103 1104 1105 1106
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1107
		.machine_check		= machine_check_4xx,
1108
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1109 1110 1111 1112 1113
	},
	{	/* STB 04xxx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41810000,
		.cpu_name		= "STB04xxx",
1114
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1115 1116 1117 1118
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1119
		.machine_check		= machine_check_4xx,
1120
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1121 1122 1123 1124 1125
	},
	{	/* NP405L */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41610000,
		.cpu_name		= "NP405L",
1126
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1127 1128 1129 1130
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1131
		.machine_check		= machine_check_4xx,
1132
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1133 1134 1135 1136 1137
	},
	{	/* NP4GS3 */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x40B10000,
		.cpu_name		= "NP4GS3",
1138
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1139 1140 1141 1142
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1143
		.machine_check		= machine_check_4xx,
1144
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1145 1146 1147 1148 1149
	},
	{   /* NP405H */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41410000,
		.cpu_name		= "NP405H",
1150
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1151 1152 1153 1154
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1155
		.machine_check		= machine_check_4xx,
1156
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1157 1158 1159 1160 1161
	},
	{	/* 405GPr */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x50910000,
		.cpu_name		= "405GPr",
1162
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1163 1164 1165 1166
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1167
		.machine_check		= machine_check_4xx,
1168
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1169 1170 1171 1172 1173
	},
	{   /* STBx25xx */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51510000,
		.cpu_name		= "STBx25xx",
1174
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1175 1176 1177 1178
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1179
		.machine_check		= machine_check_4xx,
1180
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1181 1182 1183 1184 1185
	},
	{	/* 405LP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x41F10000,
		.cpu_name		= "405LP",
1186
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1187 1188 1189
		.cpu_user_features	= PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1190
		.machine_check		= machine_check_4xx,
1191
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1192 1193
	},
	{	/* Xilinx Virtex-II Pro  */
1194
		.pvr_mask		= 0xfffff000,
L
Linus Torvalds 已提交
1195 1196
		.pvr_value		= 0x20010000,
		.cpu_name		= "Virtex-II Pro",
1197
		.cpu_features		= CPU_FTRS_40X,
L
Linus Torvalds 已提交
1198 1199 1200 1201
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1202
		.machine_check		= machine_check_4xx,
1203
		.platform		= "ppc405",
L
Linus Torvalds 已提交
1204
	},
1205 1206 1207 1208 1209 1210 1211 1212 1213
	{	/* Xilinx Virtex-4 FX */
		.pvr_mask		= 0xfffff000,
		.pvr_value		= 0x20011000,
		.cpu_name		= "Virtex-4 FX",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1214
		.machine_check		= machine_check_4xx,
1215
		.platform		= "ppc405",
1216
	},
1217 1218 1219 1220
	{	/* 405EP */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x51210000,
		.cpu_name		= "405EP",
1221
		.cpu_features		= CPU_FTRS_40X,
1222 1223 1224 1225
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1226
		.machine_check		= machine_check_4xx,
1227 1228 1229
		.platform		= "ppc405",
	},
	{	/* 405EX */
1230 1231
		.pvr_mask		= 0xffff0004,
		.pvr_value		= 0x12910004,
1232 1233
		.cpu_name		= "405EX",
		.cpu_features		= CPU_FTRS_40X,
1234 1235 1236 1237
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1238
		.machine_check		= machine_check_4xx,
1239
		.platform		= "ppc405",
1240
	},
1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252
	{	/* 405EXr */
		.pvr_mask		= 0xffff0004,
		.pvr_value		= 0x12910000,
		.cpu_name		= "405EXr",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	},
1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic 40x PPC)",
		.cpu_features		= CPU_FTRS_40X,
		.cpu_user_features	= PPC_FEATURE_32 |
			PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc405",
	}
L
Linus Torvalds 已提交
1265 1266 1267

#endif /* CONFIG_40x */
#ifdef CONFIG_44x
M
Matt Porter 已提交
1268 1269 1270
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000850,
1271 1272 1273 1274 1275
		.cpu_name		= "440GR Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1276
		.machine_check		= machine_check_4xx,
1277 1278 1279 1280 1281
		.platform		= "ppc440",
	},
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000858,
M
Matt Porter 已提交
1282
		.cpu_name		= "440EP Rev. A",
1283
		.cpu_features		= CPU_FTRS_44X,
1284
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
M
Matt Porter 已提交
1285 1286
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1287
		.cpu_setup		= __setup_cpu_440ep,
1288
		.machine_check		= machine_check_4xx,
1289
		.platform		= "ppc440",
M
Matt Porter 已提交
1290 1291 1292 1293
	},
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008d3,
1294
		.cpu_name		= "440GR Rev. B",
1295
		.cpu_features		= CPU_FTRS_44X,
1296
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
M
Matt Porter 已提交
1297 1298
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1299
		.machine_check		= machine_check_4xx,
1300
		.platform		= "ppc440",
M
Matt Porter 已提交
1301
	},
1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313
	{ /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000ff7,
		.pvr_value		= 0x400008d4,
		.cpu_name		= "440EP Rev. C",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440ep,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc440",
	},
1314 1315 1316 1317
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008db,
		.cpu_name		= "440EP Rev. B",
1318 1319 1320 1321
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1322
		.cpu_setup		= __setup_cpu_440ep,
1323
		.machine_check		= machine_check_4xx,
1324
		.platform		= "ppc440",
1325 1326 1327
	},
	{ /* 440GRX */
		.pvr_mask		= 0xf0000ffb,
1328
		.pvr_value		= 0x200008D0,
1329 1330 1331 1332 1333
		.cpu_name		= "440GRX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1334
		.cpu_setup		= __setup_cpu_440grx,
1335
		.machine_check		= machine_check_440A,
1336
		.platform		= "ppc440",
1337
	},
1338 1339 1340 1341 1342 1343 1344 1345 1346
	{ /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000ffb,
		.pvr_value		= 0x200008D8,
		.cpu_name		= "440EPX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_440epx,
1347
		.machine_check		= machine_check_440A,
1348 1349
		.platform		= "ppc440",
	},
S
Stephen Rothwell 已提交
1350
	{	/* 440GP Rev. B */
L
Linus Torvalds 已提交
1351 1352 1353
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000440,
		.cpu_name		= "440GP Rev. B",
1354
		.cpu_features		= CPU_FTRS_44X,
1355
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1356 1357
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1358
		.machine_check		= machine_check_4xx,
1359
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1360
	},
S
Stephen Rothwell 已提交
1361
	{	/* 440GP Rev. C */
L
Linus Torvalds 已提交
1362 1363 1364
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000481,
		.cpu_name		= "440GP Rev. C",
1365
		.cpu_features		= CPU_FTRS_44X,
1366
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1367 1368
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1369
		.machine_check		= machine_check_4xx,
1370
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1371 1372 1373 1374 1375
	},
	{ /* 440GX Rev. A */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000850,
		.cpu_name		= "440GX Rev. A",
1376
		.cpu_features		= CPU_FTRS_44X,
1377
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1378 1379
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1380 1381
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1382
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1383 1384 1385 1386 1387
	},
	{ /* 440GX Rev. B */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000851,
		.cpu_name		= "440GX Rev. B",
1388
		.cpu_features		= CPU_FTRS_44X,
1389
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1390 1391
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1392 1393
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1394
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1395 1396 1397 1398 1399
	},
	{ /* 440GX Rev. C */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000892,
		.cpu_name		= "440GX Rev. C",
1400
		.cpu_features		= CPU_FTRS_44X,
1401
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1402 1403
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1404 1405
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1406
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1407
	},
1408 1409 1410 1411
	{ /* 440GX Rev. F */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000894,
		.cpu_name		= "440GX Rev. F",
1412
		.cpu_features		= CPU_FTRS_44X,
1413
		.cpu_user_features	= COMMON_USER_BOOKE,
1414 1415
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1416 1417
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1418
		.platform		= "ppc440",
1419
	},
1420
	{ /* 440SP Rev. A */
1421 1422
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53200891,
1423
		.cpu_name		= "440SP Rev. A",
1424
		.cpu_features		= CPU_FTRS_44X,
1425
		.cpu_user_features	= COMMON_USER_BOOKE,
1426 1427
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1428
		.machine_check		= machine_check_4xx,
1429
		.platform		= "ppc440",
1430
	},
R
Roland Dreier 已提交
1431
	{ /* 440SPe Rev. A */
1432 1433 1434 1435 1436 1437 1438
		.pvr_mask               = 0xfff00fff,
		.pvr_value              = 0x53400890,
		.cpu_name               = "440SPe Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features      = COMMON_USER_BOOKE,
		.icache_bsize           = 32,
		.dcache_bsize           = 32,
1439 1440
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1441 1442 1443 1444 1445 1446
		.platform               = "ppc440",
	},
	{ /* 440SPe Rev. B */
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53400891,
		.cpu_name		= "440SPe Rev. B",
K
Kumar Gala 已提交
1447
		.cpu_features		= CPU_FTRS_44X,
1448
		.cpu_user_features	= COMMON_USER_BOOKE,
R
Roland Dreier 已提交
1449 1450
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1451 1452
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1453
		.platform		= "ppc440",
R
Roland Dreier 已提交
1454
	},
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464
	{ /* 440 in Xilinx Virtex-5 FXT */
		.pvr_mask		= 0xfffffff0,
		.pvr_value		= 0x7ff21910,
		.cpu_name		= "440 in Virtex-5 FXT",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.platform		= "ppc440",
	},
1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481
	{ /* 460EX */
		.pvr_mask		= 0xffff0002,
		.pvr_value		= 0x13020002,
		.cpu_name		= "460EX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.cpu_setup		= __setup_cpu_460ex,
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
	{ /* 460GT */
		.pvr_mask		= 0xffff0002,
		.pvr_value		= 0x13020000,
		.cpu_name		= "460GT",
		.cpu_features		= CPU_FTRS_44X,
1482
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1483 1484
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1485
		.cpu_setup		= __setup_cpu_460gt,
1486 1487 1488
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic 44x PPC)",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_4xx,
		.platform		= "ppc440",
	}
L
Linus Torvalds 已提交
1500
#endif /* CONFIG_44x */
1501
#ifdef CONFIG_E200
S
Stephen Rothwell 已提交
1502
	{	/* e200z5 */
1503 1504 1505 1506
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81000000,
		.cpu_name		= "e200z5",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1507
		.cpu_features		= CPU_FTRS_E200,
1508 1509
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
1510 1511
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
1512
		.machine_check		= machine_check_e200,
1513
		.platform		= "ppc5554",
1514
	},
S
Stephen Rothwell 已提交
1515
	{	/* e200z6 */
1516 1517 1518 1519
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81100000,
		.cpu_name		= "e200z6",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1520
		.cpu_features		= CPU_FTRS_E200,
1521
		.cpu_user_features	= COMMON_USER_BOOKE |
1522 1523
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1524 1525
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
1526
		.machine_check		= machine_check_e200,
1527
		.platform		= "ppc5554",
1528
	},
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic E200 PPC)",
		.cpu_features		= CPU_FTRS_E200,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
		.machine_check		= machine_check_e200,
		.platform		= "ppc5554",
1540
	}
1541 1542
#endif /* CONFIG_E200 */
#ifdef CONFIG_E500
S
Stephen Rothwell 已提交
1543
	{	/* e500 */
L
Linus Torvalds 已提交
1544 1545 1546
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80200000,
		.cpu_name		= "e500",
1547
		.cpu_features		= CPU_FTRS_E500,
1548
		.cpu_user_features	= COMMON_USER_BOOKE |
1549 1550
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
L
Linus Torvalds 已提交
1551 1552 1553
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1554
		.oprofile_cpu_type	= "ppc/e500",
1555
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1556
		.machine_check		= machine_check_e500,
1557
		.platform		= "ppc8540",
L
Linus Torvalds 已提交
1558
	},
S
Stephen Rothwell 已提交
1559
	{	/* e500v2 */
1560 1561 1562
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80210000,
		.cpu_name		= "e500v2",
1563
		.cpu_features		= CPU_FTRS_E500_2,
1564
		.cpu_user_features	= COMMON_USER_BOOKE |
1565 1566 1567
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
			PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1568 1569 1570
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1571
		.oprofile_cpu_type	= "ppc/e500",
1572
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1573
		.machine_check		= machine_check_e500,
1574
		.platform		= "ppc8548",
1575
	},
1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589
	{	/* e500mc */
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80230000,
		.cpu_name		= "e500mc",
		.cpu_features		= CPU_FTRS_E500MC,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.icache_bsize		= 64,
		.dcache_bsize		= 64,
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e500", /* xxx - galak, e500mc? */
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
		.machine_check		= machine_check_e500,
		.platform		= "ppce500mc",
	},
L
Linus Torvalds 已提交
1590 1591 1592
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
1593 1594 1595 1596 1597
		.cpu_name		= "(generic E500 PPC)",
		.cpu_features		= CPU_FTRS_E500,
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
L
Linus Torvalds 已提交
1598 1599
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1600
		.machine_check		= machine_check_e500,
1601
		.platform		= "powerpc",
1602
	}
1603
#endif /* CONFIG_E500 */
S
Stephen Rothwell 已提交
1604
#endif /* CONFIG_PPC32 */
L
Linus Torvalds 已提交
1605
};
1606

1607 1608 1609
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1610 1611
{
	struct cpu_spec *s = cpu_specs;
1612
	struct cpu_spec *t = &the_cpu_spec;
1613 1614 1615
	int i;

	s = PTRRELOC(s);
1616
	t = PTRRELOC(t);
1617 1618 1619

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634
			/*
			 * If we are overriding a previous value derived
			 * from the real PVR with a new value obtained
			 * using a logical PVR value, don't modify the
			 * performance monitor fields.
			 */
			if (t->num_pmcs && !s->num_pmcs) {
				t->cpu_name = s->cpu_name;
				t->cpu_features = s->cpu_features;
				t->cpu_user_features = s->cpu_user_features;
				t->icache_bsize = s->icache_bsize;
				t->dcache_bsize = s->dcache_bsize;
				t->cpu_setup = s->cpu_setup;
				t->cpu_restore = s->cpu_restore;
				t->platform = s->platform;
1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651
				/*
				 * If we have passed through this logic once
				 * before and have pulled the default case
				 * because the real PVR was not found inside
				 * cpu_specs[], then we are possibly running in
				 * compatibility mode. In that case, let the
				 * oprofiler know which set of compatibility
				 * counters to pull from by making sure the
				 * oprofile_cpu_type string is set to that of
				 * compatibility mode. If the oprofile_cpu_type
				 * already has a value, then we are possibly
				 * overriding a real PVR with a logical one, and,
				 * in that case, keep the current value for
				 * oprofile_cpu_type.
				 */
				if (t->oprofile_cpu_type == NULL)
					t->oprofile_cpu_type = s->oprofile_cpu_type;
1652 1653 1654
			} else
				*t = *s;
			*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1655
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1656
			/* ppc64 and booke expect identify_cpu to also call
1657 1658
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1659
			 * we also don't need to PTRRELOC the function pointer
1660 1661
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1662 1663 1664 1665
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1666
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1667 1668 1669 1670 1671
			return s;
		}
	BUG();
	return NULL;
}