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

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

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

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

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

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

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

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

1604 1605 1606
static struct cpu_spec the_cpu_spec;

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

	s = PTRRELOC(s);
1613
	t = PTRRELOC(t);
1614 1615 1616

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634
			/*
			 * If we are overriding a previous value derived
			 * from the real PVR with a new value obtained
			 * using a logical PVR value, don't modify the
			 * performance monitor fields.
			 */
			if (t->num_pmcs && !s->num_pmcs) {
				t->cpu_name = s->cpu_name;
				t->cpu_features = s->cpu_features;
				t->cpu_user_features = s->cpu_user_features;
				t->icache_bsize = s->icache_bsize;
				t->dcache_bsize = s->dcache_bsize;
				t->cpu_setup = s->cpu_setup;
				t->cpu_restore = s->cpu_restore;
				t->platform = s->platform;
			} else
				*t = *s;
			*PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1635
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1636
			/* ppc64 and booke expect identify_cpu to also call
1637 1638
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1639
			 * we also don't need to PTRRELOC the function pointer
1640 1641
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1642 1643 1644 1645
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1646
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1647 1648 1649 1650 1651
			return s;
		}
	BUG();
	return NULL;
}