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

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

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

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

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

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

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

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

1540 1541 1542
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1543 1544
{
	struct cpu_spec *s = cpu_specs;
1545
	struct cpu_spec *t = &the_cpu_spec;
1546 1547 1548
	int i;

	s = PTRRELOC(s);
1549
	t = PTRRELOC(t);
1550 1551 1552

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570
			/*
			 * 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;
1571
#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1572
			/* ppc64 and booke expect identify_cpu to also call
1573 1574
			 * setup_cpu for that processor. I will consolidate
			 * that at a later time, for now, just use #ifdef.
1575
			 * we also don't need to PTRRELOC the function pointer
1576 1577
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1578 1579 1580 1581
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1582
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1583 1584 1585 1586 1587 1588
			return s;
		}
	BUG();
	return NULL;
}

1589
void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1590 1591 1592 1593
{
	struct fixup_entry {
		unsigned long	mask;
		unsigned long	value;
1594 1595
		long		start_off;
		long		end_off;
1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609
	} *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
		 */
1610 1611
		pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
		pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622

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