cputable.c 50.4 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

26 27 28
/* The platform string corresponding to the real PVR */
const char *powerpc_base_platform;

S
Stephen Rothwell 已提交
29 30 31 32 33 34 35
/* 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
 */
36
#ifdef CONFIG_PPC32
37 38
extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
39
extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
40
extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
41
extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
42
extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
43
extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
44
extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
45 46 47 48 49 50 51 52
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 已提交
53
#endif /* CONFIG_PPC32 */
O
Olof Johansson 已提交
54
#ifdef CONFIG_PPC64
55
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
56
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
O
Olof Johansson 已提交
57
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
58
extern void __restore_cpu_pa6t(void);
O
Olof Johansson 已提交
59
extern void __restore_cpu_ppc970(void);
60 61
extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
extern void __restore_cpu_power7(void);
O
Olof Johansson 已提交
62
#endif /* CONFIG_PPC64 */
L
Linus Torvalds 已提交
63 64 65 66

/* This table only contains "desktop" CPUs, it need to be filled with embedded
 * ones as well...
 */
S
Stephen Rothwell 已提交
67 68 69
#define COMMON_USER		(PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
				 PPC_FEATURE_HAS_MMU)
#define COMMON_USER_PPC64	(COMMON_USER | PPC_FEATURE_64)
70
#define COMMON_USER_POWER4	(COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
71 72 73 74
#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)
75
#define COMMON_USER_POWER6	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
76
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
77 78
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
79 80
#define COMMON_USER_POWER7	(COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
				 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
81 82
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
83 84 85
#define COMMON_USER_PA6T	(COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
				 PPC_FEATURE_TRUE_LE | \
				 PPC_FEATURE_HAS_ALTIVEC_COMP)
86 87
#define COMMON_USER_BOOKE	(PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
				 PPC_FEATURE_BOOKE)
L
Linus Torvalds 已提交
88

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

#endif /* CONFIG_40x */
#ifdef CONFIG_44x
M
Matt Porter 已提交
1309 1310 1311
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000850,
1312 1313 1314 1315 1316
		.cpu_name		= "440GR Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1317
		.machine_check		= machine_check_4xx,
1318 1319 1320 1321 1322
		.platform		= "ppc440",
	},
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000858,
M
Matt Porter 已提交
1323
		.cpu_name		= "440EP Rev. A",
1324
		.cpu_features		= CPU_FTRS_44X,
1325
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
M
Matt Porter 已提交
1326 1327
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1328
		.cpu_setup		= __setup_cpu_440ep,
1329
		.machine_check		= machine_check_4xx,
1330
		.platform		= "ppc440",
M
Matt Porter 已提交
1331 1332 1333 1334
	},
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008d3,
1335
		.cpu_name		= "440GR Rev. B",
1336
		.cpu_features		= CPU_FTRS_44X,
1337
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
M
Matt Porter 已提交
1338 1339
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1340
		.machine_check		= machine_check_4xx,
1341
		.platform		= "ppc440",
M
Matt Porter 已提交
1342
	},
1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354
	{ /* 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",
	},
1355 1356 1357 1358
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008db,
		.cpu_name		= "440EP Rev. B",
1359 1360 1361 1362
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1363
		.cpu_setup		= __setup_cpu_440ep,
1364
		.machine_check		= machine_check_4xx,
1365
		.platform		= "ppc440",
1366 1367 1368
	},
	{ /* 440GRX */
		.pvr_mask		= 0xf0000ffb,
1369
		.pvr_value		= 0x200008D0,
1370 1371 1372 1373 1374
		.cpu_name		= "440GRX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1375
		.cpu_setup		= __setup_cpu_440grx,
1376
		.machine_check		= machine_check_440A,
1377
		.platform		= "ppc440",
1378
	},
1379 1380 1381 1382 1383 1384 1385 1386 1387
	{ /* 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,
1388
		.machine_check		= machine_check_440A,
1389 1390
		.platform		= "ppc440",
	},
S
Stephen Rothwell 已提交
1391
	{	/* 440GP Rev. B */
L
Linus Torvalds 已提交
1392 1393 1394
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000440,
		.cpu_name		= "440GP Rev. B",
1395
		.cpu_features		= CPU_FTRS_44X,
1396
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1397 1398
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1399
		.machine_check		= machine_check_4xx,
1400
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1401
	},
S
Stephen Rothwell 已提交
1402
	{	/* 440GP Rev. C */
L
Linus Torvalds 已提交
1403 1404 1405
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000481,
		.cpu_name		= "440GP Rev. C",
1406
		.cpu_features		= CPU_FTRS_44X,
1407
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1408 1409
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1410
		.machine_check		= machine_check_4xx,
1411
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1412 1413 1414 1415 1416
	},
	{ /* 440GX Rev. A */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000850,
		.cpu_name		= "440GX Rev. A",
1417
		.cpu_features		= CPU_FTRS_44X,
1418
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1419 1420
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1421 1422
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1423
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1424 1425 1426 1427 1428
	},
	{ /* 440GX Rev. B */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000851,
		.cpu_name		= "440GX Rev. B",
1429
		.cpu_features		= CPU_FTRS_44X,
1430
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1431 1432
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1433 1434
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1435
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1436 1437 1438 1439 1440
	},
	{ /* 440GX Rev. C */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000892,
		.cpu_name		= "440GX Rev. C",
1441
		.cpu_features		= CPU_FTRS_44X,
1442
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1443 1444
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1445 1446
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1447
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1448
	},
1449 1450 1451 1452
	{ /* 440GX Rev. F */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000894,
		.cpu_name		= "440GX Rev. F",
1453
		.cpu_features		= CPU_FTRS_44X,
1454
		.cpu_user_features	= COMMON_USER_BOOKE,
1455 1456
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1457 1458
		.cpu_setup		= __setup_cpu_440gx,
		.machine_check		= machine_check_440A,
1459
		.platform		= "ppc440",
1460
	},
1461
	{ /* 440SP Rev. A */
1462 1463
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53200891,
1464
		.cpu_name		= "440SP Rev. A",
1465
		.cpu_features		= CPU_FTRS_44X,
1466
		.cpu_user_features	= COMMON_USER_BOOKE,
1467 1468
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1469
		.machine_check		= machine_check_4xx,
1470
		.platform		= "ppc440",
1471
	},
R
Roland Dreier 已提交
1472
	{ /* 440SPe Rev. A */
1473 1474 1475 1476 1477 1478 1479
		.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,
1480 1481
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1482 1483 1484 1485 1486 1487
		.platform               = "ppc440",
	},
	{ /* 440SPe Rev. B */
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53400891,
		.cpu_name		= "440SPe Rev. B",
K
Kumar Gala 已提交
1488
		.cpu_features		= CPU_FTRS_44X,
1489
		.cpu_user_features	= COMMON_USER_BOOKE,
R
Roland Dreier 已提交
1490 1491
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1492 1493
		.cpu_setup		= __setup_cpu_440spe,
		.machine_check		= machine_check_440A,
1494
		.platform		= "ppc440",
R
Roland Dreier 已提交
1495
	},
1496 1497 1498 1499 1500 1501 1502 1503
	{ /* 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,
1504 1505
		.cpu_setup		= __setup_cpu_440x5,
		.machine_check		= machine_check_440A,
1506 1507
		.platform		= "ppc440",
	},
1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524
	{ /* 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,
1525
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1526 1527
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1528
		.cpu_setup		= __setup_cpu_460gt,
1529 1530 1531
		.machine_check		= machine_check_440A,
		.platform		= "ppc440",
	},
1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542
	{	/* 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 已提交
1543
#endif /* CONFIG_44x */
1544
#ifdef CONFIG_E200
S
Stephen Rothwell 已提交
1545
	{	/* e200z5 */
1546 1547 1548 1549
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81000000,
		.cpu_name		= "e200z5",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1550
		.cpu_features		= CPU_FTRS_E200,
1551 1552
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
1553 1554
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
1555
		.machine_check		= machine_check_e200,
1556
		.platform		= "ppc5554",
1557
	},
S
Stephen Rothwell 已提交
1558
	{	/* e200z6 */
1559 1560 1561 1562
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81100000,
		.cpu_name		= "e200z6",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1563
		.cpu_features		= CPU_FTRS_E200,
1564
		.cpu_user_features	= COMMON_USER_BOOKE |
1565 1566
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1567 1568
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
1569
		.machine_check		= machine_check_e200,
1570
		.platform		= "ppc5554",
1571
	},
1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582
	{	/* 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",
1583
	}
1584 1585
#endif /* CONFIG_E200 */
#ifdef CONFIG_E500
S
Stephen Rothwell 已提交
1586
	{	/* e500 */
L
Linus Torvalds 已提交
1587 1588 1589
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80200000,
		.cpu_name		= "e500",
1590
		.cpu_features		= CPU_FTRS_E500,
1591
		.cpu_user_features	= COMMON_USER_BOOKE |
1592 1593
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
L
Linus Torvalds 已提交
1594 1595 1596
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1597
		.oprofile_cpu_type	= "ppc/e500",
1598
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1599
		.machine_check		= machine_check_e500,
1600
		.platform		= "ppc8540",
L
Linus Torvalds 已提交
1601
	},
S
Stephen Rothwell 已提交
1602
	{	/* e500v2 */
1603 1604 1605
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80210000,
		.cpu_name		= "e500v2",
1606
		.cpu_features		= CPU_FTRS_E500_2,
1607
		.cpu_user_features	= COMMON_USER_BOOKE |
1608 1609 1610
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
			PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1611 1612 1613
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1614
		.oprofile_cpu_type	= "ppc/e500",
1615
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
1616
		.machine_check		= machine_check_e500,
1617
		.platform		= "ppc8548",
1618
	},
1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632
	{	/* 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 已提交
1633 1634 1635
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
1636 1637 1638 1639 1640
		.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 已提交
1641 1642
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1643
		.machine_check		= machine_check_e500,
1644
		.platform		= "powerpc",
1645
	}
1646
#endif /* CONFIG_E500 */
S
Stephen Rothwell 已提交
1647
#endif /* CONFIG_PPC32 */
L
Linus Torvalds 已提交
1648
};
1649

1650 1651 1652
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1653 1654
{
	struct cpu_spec *s = cpu_specs;
1655
	struct cpu_spec *t = &the_cpu_spec;
1656 1657 1658
	int i;

	s = PTRRELOC(s);
1659
	t = PTRRELOC(t);
1660 1661 1662

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677
			/*
			 * 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;
1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694
				/*
				 * 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;
1695 1696 1697
			} else
				*t = *s;
			*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1698 1699 1700 1701 1702

			/*
			 * Set the base platform string once; assumes
			 * we're called with real pvr first.
			 */
1703 1704
			if (*PTRRELOC(&powerpc_base_platform) == NULL)
				*PTRRELOC(&powerpc_base_platform) = t->platform;
1705

1706
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1707
			/* ppc64 and booke expect identify_cpu to also call
1708 1709
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1710
			 * we also don't need to PTRRELOC the function pointer
1711 1712
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1713 1714 1715 1716
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1717
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1718 1719 1720 1721 1722
			return s;
		}
	BUG();
	return NULL;
}