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

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

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

#endif /* CONFIG_40x */
#ifdef CONFIG_44x
M
Matt Porter 已提交
1104 1105 1106
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000850,
1107 1108 1109 1110 1111 1112 1113 1114 1115 1116
		.cpu_name		= "440GR Rev. A",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.platform		= "ppc440",
	},
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000858,
M
Matt Porter 已提交
1117
		.cpu_name		= "440EP Rev. A",
1118
		.cpu_features		= CPU_FTRS_44X,
1119
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
M
Matt Porter 已提交
1120 1121
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1122
		.cpu_setup		= __setup_cpu_440ep,
1123
		.platform		= "ppc440",
M
Matt Porter 已提交
1124 1125 1126 1127
	},
	{
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008d3,
1128
		.cpu_name		= "440GR Rev. B",
1129
		.cpu_features		= CPU_FTRS_44X,
1130
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
M
Matt Porter 已提交
1131 1132
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1133
		.platform		= "ppc440",
M
Matt Porter 已提交
1134
	},
1135 1136 1137 1138
	{ /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x400008db,
		.cpu_name		= "440EP Rev. B",
1139 1140 1141 1142
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1143
		.cpu_setup		= __setup_cpu_440ep,
1144
		.platform		= "ppc440",
1145 1146 1147
	},
	{ /* 440GRX */
		.pvr_mask		= 0xf0000ffb,
1148
		.pvr_value		= 0x200008D0,
1149 1150 1151 1152 1153
		.cpu_name		= "440GRX",
		.cpu_features		= CPU_FTRS_44X,
		.cpu_user_features	= COMMON_USER_BOOKE,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1154 1155
		.cpu_setup		= __setup_cpu_440grx,
		.platform		= "ppc440",
1156
	},
1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167
	{ /* 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,
		.platform		= "ppc440",
	},
S
Stephen Rothwell 已提交
1168
	{	/* 440GP Rev. B */
L
Linus Torvalds 已提交
1169 1170 1171
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000440,
		.cpu_name		= "440GP Rev. B",
1172
		.cpu_features		= CPU_FTRS_44X,
1173
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1174 1175
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1176
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1177
	},
S
Stephen Rothwell 已提交
1178
	{	/* 440GP Rev. C */
L
Linus Torvalds 已提交
1179 1180 1181
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x40000481,
		.cpu_name		= "440GP Rev. C",
1182
		.cpu_features		= CPU_FTRS_44X,
1183
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1184 1185
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1186
		.platform		= "ppc440gp",
L
Linus Torvalds 已提交
1187 1188 1189 1190 1191
	},
	{ /* 440GX Rev. A */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000850,
		.cpu_name		= "440GX Rev. A",
1192
		.cpu_features		= CPU_FTRS_44X,
1193
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1194 1195
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1196
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1197 1198 1199 1200 1201
	},
	{ /* 440GX Rev. B */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000851,
		.cpu_name		= "440GX Rev. B",
1202
		.cpu_features		= CPU_FTRS_44X,
1203
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1204 1205
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1206
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1207 1208 1209 1210 1211
	},
	{ /* 440GX Rev. C */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000892,
		.cpu_name		= "440GX Rev. C",
1212
		.cpu_features		= CPU_FTRS_44X,
1213
		.cpu_user_features	= COMMON_USER_BOOKE,
L
Linus Torvalds 已提交
1214 1215
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1216
		.platform		= "ppc440",
L
Linus Torvalds 已提交
1217
	},
1218 1219 1220 1221
	{ /* 440GX Rev. F */
		.pvr_mask		= 0xf0000fff,
		.pvr_value		= 0x50000894,
		.cpu_name		= "440GX Rev. F",
1222
		.cpu_features		= CPU_FTRS_44X,
1223
		.cpu_user_features	= COMMON_USER_BOOKE,
1224 1225
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1226
		.platform		= "ppc440",
1227
	},
1228
	{ /* 440SP Rev. A */
1229 1230
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53200891,
1231
		.cpu_name		= "440SP Rev. A",
1232
		.cpu_features		= CPU_FTRS_44X,
1233
		.cpu_user_features	= COMMON_USER_BOOKE,
1234 1235
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1236
		.platform		= "ppc440",
1237
	},
R
Roland Dreier 已提交
1238
	{ /* 440SPe Rev. A */
1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251
		.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,
		.platform               = "ppc440",
	},
	{ /* 440SPe Rev. B */
		.pvr_mask		= 0xfff00fff,
		.pvr_value		= 0x53400891,
		.cpu_name		= "440SPe Rev. B",
K
Kumar Gala 已提交
1252
		.cpu_features		= CPU_FTRS_44X,
1253
		.cpu_user_features	= COMMON_USER_BOOKE,
R
Roland Dreier 已提交
1254 1255
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1256
		.platform		= "ppc440",
R
Roland Dreier 已提交
1257
	},
L
Linus Torvalds 已提交
1258
#endif /* CONFIG_44x */
1259
#ifdef CONFIG_FSL_BOOKE
S
Stephen Rothwell 已提交
1260
	{	/* e200z5 */
1261 1262 1263 1264
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81000000,
		.cpu_name		= "e200z5",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1265
		.cpu_features		= CPU_FTRS_E200,
1266 1267
		.cpu_user_features	= COMMON_USER_BOOKE |
			PPC_FEATURE_HAS_EFP_SINGLE |
1268 1269
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
1270
		.platform		= "ppc5554",
1271
	},
S
Stephen Rothwell 已提交
1272
	{	/* e200z6 */
1273 1274 1275 1276
		.pvr_mask		= 0xfff00000,
		.pvr_value		= 0x81100000,
		.cpu_name		= "e200z6",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1277
		.cpu_features		= CPU_FTRS_E200,
1278
		.cpu_user_features	= COMMON_USER_BOOKE |
1279 1280
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1281 1282
			PPC_FEATURE_UNIFIED_CACHE,
		.dcache_bsize		= 32,
1283
		.platform		= "ppc5554",
1284
	},
S
Stephen Rothwell 已提交
1285
	{	/* e500 */
L
Linus Torvalds 已提交
1286 1287 1288 1289
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80200000,
		.cpu_name		= "e500",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1290
		.cpu_features		= CPU_FTRS_E500,
1291
		.cpu_user_features	= COMMON_USER_BOOKE |
1292 1293
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP,
L
Linus Torvalds 已提交
1294 1295 1296
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1297
		.oprofile_cpu_type	= "ppc/e500",
1298
		.oprofile_type		= PPC_OPROFILE_BOOKE,
1299
		.platform		= "ppc8540",
L
Linus Torvalds 已提交
1300
	},
S
Stephen Rothwell 已提交
1301
	{	/* e500v2 */
1302 1303 1304 1305
		.pvr_mask		= 0xffff0000,
		.pvr_value		= 0x80210000,
		.cpu_name		= "e500v2",
		/* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1306
		.cpu_features		= CPU_FTRS_E500_2,
1307
		.cpu_user_features	= COMMON_USER_BOOKE |
1308 1309 1310
			PPC_FEATURE_HAS_SPE_COMP |
			PPC_FEATURE_HAS_EFP_SINGLE_COMP |
			PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1311 1312 1313
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
1314
		.oprofile_cpu_type	= "ppc/e500",
1315
		.oprofile_type		= PPC_OPROFILE_BOOKE,
1316
		.platform		= "ppc8548",
1317
	},
L
Linus Torvalds 已提交
1318 1319 1320 1321 1322 1323
#endif
#if !CLASSIC_PPC
	{	/* default match */
		.pvr_mask		= 0x00000000,
		.pvr_value		= 0x00000000,
		.cpu_name		= "(generic PPC)",
1324
		.cpu_features		= CPU_FTRS_GENERIC_32,
L
Linus Torvalds 已提交
1325 1326 1327
		.cpu_user_features	= PPC_FEATURE_32,
		.icache_bsize		= 32,
		.dcache_bsize		= 32,
1328
		.platform		= "powerpc",
L
Linus Torvalds 已提交
1329 1330
	}
#endif /* !CLASSIC_PPC */
S
Stephen Rothwell 已提交
1331
#endif /* CONFIG_PPC32 */
L
Linus Torvalds 已提交
1332
};
1333

1334 1335 1336
static struct cpu_spec the_cpu_spec;

struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1337 1338
{
	struct cpu_spec *s = cpu_specs;
1339
	struct cpu_spec *t = &the_cpu_spec;
1340 1341 1342
	int i;

	s = PTRRELOC(s);
1343
	t = PTRRELOC(t);
1344 1345 1346

	for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
		if ((pvr & s->pvr_mask) == s->pvr_value) {
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364
			/*
			 * 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;
1365 1366 1367 1368
#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.
1369
			 * we also don't need to PTRRELOC the function pointer
1370 1371
			 * on ppc64 and booke as we are running at 0 in real
			 * mode on ppc64 and reloc_offset is always 0 on booke.
1372 1373 1374 1375
			 */
			if (s->cpu_setup) {
				s->cpu_setup(offset, s);
			}
1376
#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1377 1378 1379 1380 1381 1382
			return s;
		}
	BUG();
	return NULL;
}

1383
void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
1384 1385 1386 1387
{
	struct fixup_entry {
		unsigned long	mask;
		unsigned long	value;
1388 1389
		long		start_off;
		long		end_off;
1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403
	} *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
		 */
1404 1405
		pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
		pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416

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