cputable.c 47.5 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 56
extern void __restore_cpu_ppc970(void);
#endif /* CONFIG_PPC64 */
L
Linus Torvalds 已提交
57 58 59 60

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

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

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

1556 1557 1558
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1559 1560
{
	struct cpu_spec *s = cpu_specs;
1561
	struct cpu_spec *t = &the_cpu_spec;
1562 1563 1564
	int i;

	s = PTRRELOC(s);
1565
	t = PTRRELOC(t);
1566 1567 1568

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586
			/*
			 * 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;
1587
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1588
			/* ppc64 and booke expect identify_cpu to also call
1589 1590
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1591
			 * we also don't need to PTRRELOC the function pointer
1592 1593
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1594 1595 1596 1597
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1598
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1599 1600 1601 1602 1603 1604
			return s;
		}
	BUG();
	return NULL;
}

1605
void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1606 1607 1608 1609
{
	struct fixup_entry {
		unsigned long	mask;
		unsigned long	value;
1610 1611
		long		start_off;
		long		end_off;
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625
	} *fcur, *fend;

	fcur = fixup_start;
	fend = fixup_end;

	for (; fcur < fend; fcur++) {
		unsigned int *pstart, *pend, *p;

		if ((value & fcur->mask) == fcur->value)
			continue;

		/* These PTRRELOCs will disappear once the new scheme for
		 * modules and vdso is implemented
		 */
1626 1627
		pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
		pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638

		for (p = pstart; p < pend; p++) {
			*p = 0x60000000u;
			asm volatile ("dcbst 0, %0" : : "r" (p));
		}
		asm volatile ("sync" : : : "memory");
		for (p = pstart; p < pend; p++)
			asm volatile ("icbi 0,%0" : : "r" (p));
		asm volatile ("sync; isync" : : : "memory");
	}
}