cputable.c 45.3 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 40 41 42 43 44 45 46
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 已提交
47
#endif /* CONFIG_PPC32 */
O
Olof Johansson 已提交
48
#ifdef CONFIG_PPC64
49
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
50
extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
O
Olof Johansson 已提交
51
extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
S
Stephen Rothwell 已提交
52
extern void __restore_cpu_pa6t(void);
O
Olof Johansson 已提交
53 54
extern void __restore_cpu_ppc970(void);
#endif /* CONFIG_PPC64 */
L
Linus Torvalds 已提交
55 56 57 58

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

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

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

1483 1484 1485
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1486 1487
{
	struct cpu_spec *s = cpu_specs;
1488
	struct cpu_spec *t = &the_cpu_spec;
1489 1490 1491
	int i;

	s = PTRRELOC(s);
1492
	t = PTRRELOC(t);
1493 1494 1495

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513
			/*
			 * 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;
1514 1515 1516 1517
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
			/* ppc64 and booke expect identify_cpu to also call 
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1518
			 * we also don't need to PTRRELOC the function pointer
1519 1520
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1521 1522 1523 1524
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1525
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1526 1527 1528 1529 1530 1531
			return s;
		}
	BUG();
	return NULL;
}

1532
void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1533 1534 1535 1536
{
	struct fixup_entry {
		unsigned long	mask;
		unsigned long	value;
1537 1538
		long		start_off;
		long		end_off;
1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552
	} *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
		 */
1553 1554
		pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
		pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565

		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");
	}
}