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

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_460ex(unsigned long offset, struct cpu_spec* spec);
43
extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
44 45 46 47 48 49 50 51
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 已提交
52
#endif /* CONFIG_PPC32 */
O
Olof Johansson 已提交
53
#ifdef CONFIG_PPC64
54
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
55
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
O
Olof Johansson 已提交
56
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
57
extern void __restore_cpu_pa6t(void);
O
Olof Johansson 已提交
58
extern void __restore_cpu_ppc970(void);
59 60
extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
extern void __restore_cpu_power7(void);
O
Olof Johansson 已提交
61
#endif /* CONFIG_PPC64 */
L
Linus Torvalds 已提交
62 63 64 65

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

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

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

1634 1635 1636
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1637 1638
{
	struct cpu_spec *s = cpu_specs;
1639
	struct cpu_spec *t = &the_cpu_spec;
1640 1641 1642
	int i;

	s = PTRRELOC(s);
1643
	t = PTRRELOC(t);
1644 1645 1646

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661
			/*
			 * 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;
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678
				/*
				 * 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;
1679 1680 1681
			} else
				*t = *s;
			*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1682 1683 1684 1685 1686

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

1690
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1691
			/* ppc64 and booke expect identify_cpu to also call
1692 1693
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1694
			 * we also don't need to PTRRELOC the function pointer
1695 1696
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1697 1698 1699 1700
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1701
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1702 1703 1704 1705 1706
			return s;
		}
	BUG();
	return NULL;
}