Merge tag 'for-4.1-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux...
[deliverable/linux.git] / arch / powerpc / kernel / cputable.c
CommitLineData
1da177e4 1/*
1da177e4
LT
2 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
4920960f
SR
4 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
1da177e4
LT
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
1da177e4
LT
13#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
4b16f8e2 17#include <linux/export.h>
400d2212
KG
18
19#include <asm/oprofile_impl.h>
1da177e4 20#include <asm/cputable.h>
42c4aaad 21#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
7c03d653 22#include <asm/mmu.h>
ae3a197e 23#include <asm/setup.h>
1da177e4 24
400d2212 25struct cpu_spec* cur_cpu_spec = NULL;
4920960f 26EXPORT_SYMBOL(cur_cpu_spec);
1da177e4 27
9115d134
NL
28/* The platform string corresponding to the real PVR */
29const char *powerpc_base_platform;
30
4920960f
SR
31/* NOTE:
32 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
33 * the responsibility of the appropriate CPU save/restore functions to
34 * eventually copy these settings over. Those save/restore aren't yet
35 * part of the cputable though. That has to be fixed for both ppc32
36 * and ppc64
37 */
b26f100d 38#ifdef CONFIG_PPC32
105c31df
KG
39extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
8112753b
VB
43extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
47c0bd1a 45extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
340ffd26 46extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
47c0bd1a 47extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
640d17d6 48extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
464076a4 49extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
939e622c 50extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
6c712090 51extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
6edc323d 52extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
400d2212
KG
53extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
54extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
55extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
56extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
57extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
58extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
59extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
60extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
4920960f 61#endif /* CONFIG_PPC32 */
f39b7a55 62#ifdef CONFIG_PPC64
400d2212 63extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
5b43d20a 64extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
1199919b 65extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
76b4eda8 66extern void __setup_cpu_a2(unsigned long offset, struct cpu_spec* spec);
40d244d6 67extern void __restore_cpu_pa6t(void);
f39b7a55 68extern void __restore_cpu_ppc970(void);
e952e6c4
MN
69extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
70extern void __restore_cpu_power7(void);
aec937b1
MN
71extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
72extern void __restore_cpu_power8(void);
76b4eda8 73extern void __restore_cpu_a2(void);
45706bb5
MS
74extern void __flush_tlb_power7(unsigned int action);
75extern void __flush_tlb_power8(unsigned int action);
e22a2274 76extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
ae744f34 77extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
f39b7a55 78#endif /* CONFIG_PPC64 */
4490c06b
KG
79#if defined(CONFIG_E500)
80extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
cd66cc2e 81extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
4490c06b 82extern void __restore_cpu_e5500(void);
cd66cc2e 83extern void __restore_cpu_e6500(void);
4490c06b 84#endif /* CONFIG_E500 */
1da177e4 85
1da177e4
LT
86/* This table only contains "desktop" CPUs, it need to be filled with embedded
87 * ones as well...
88 */
4920960f
SR
89#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
90 PPC_FEATURE_HAS_MMU)
91#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
a7ddc5e8 92#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
aa5cb021
BH
93#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
94 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
95#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
96 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
03054d51 97#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
fab5db97 98 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
0f473314
NL
99 PPC_FEATURE_TRUE_LE | \
100 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
e952e6c4
MN
101#define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
102 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
0f473314
NL
103 PPC_FEATURE_TRUE_LE | \
104 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
4a1ae4f3 105#define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
71e18497
MN
106#define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
107 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
108 PPC_FEATURE_TRUE_LE | \
109 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
748645bf
NA
110#define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
111 PPC_FEATURE2_HTM_COMP | PPC_FEATURE2_DSCR | \
dd58a092
BH
112 PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
113 PPC_FEATURE2_VEC_CRYPTO)
b3ebd1d8
OJ
114#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
115 PPC_FEATURE_TRUE_LE | \
116 PPC_FEATURE_HAS_ALTIVEC_COMP)
f45c4486
KG
117#ifdef CONFIG_PPC_BOOK3E_64
118#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
119#else
80f15dc7
PM
120#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
121 PPC_FEATURE_BOOKE)
f45c4486 122#endif
1da177e4 123
87a72f9e 124static struct cpu_spec __initdata cpu_specs[] = {
2d27cfd3 125#ifdef CONFIG_PPC_BOOK3S_64
4920960f
SR
126 { /* Power4 */
127 .pvr_mask = 0xffff0000,
128 .pvr_value = 0x00350000,
129 .cpu_name = "POWER4 (gp)",
130 .cpu_features = CPU_FTRS_POWER4,
a7ddc5e8 131 .cpu_user_features = COMMON_USER_POWER4,
44ae3ab3 132 .mmu_features = MMU_FTRS_POWER4,
4920960f
SR
133 .icache_bsize = 128,
134 .dcache_bsize = 128,
135 .num_pmcs = 8,
1bd2e5ae 136 .pmc_type = PPC_PMC_IBM,
4920960f 137 .oprofile_cpu_type = "ppc64/power4",
7a45fb19 138 .oprofile_type = PPC_OPROFILE_POWER4,
80f15dc7 139 .platform = "power4",
4920960f
SR
140 },
141 { /* Power4+ */
142 .pvr_mask = 0xffff0000,
143 .pvr_value = 0x00380000,
144 .cpu_name = "POWER4+ (gq)",
145 .cpu_features = CPU_FTRS_POWER4,
a7ddc5e8 146 .cpu_user_features = COMMON_USER_POWER4,
44ae3ab3 147 .mmu_features = MMU_FTRS_POWER4,
4920960f
SR
148 .icache_bsize = 128,
149 .dcache_bsize = 128,
150 .num_pmcs = 8,
1bd2e5ae 151 .pmc_type = PPC_PMC_IBM,
4920960f 152 .oprofile_cpu_type = "ppc64/power4",
7a45fb19 153 .oprofile_type = PPC_OPROFILE_POWER4,
80f15dc7 154 .platform = "power4",
4920960f
SR
155 },
156 { /* PPC970 */
157 .pvr_mask = 0xffff0000,
158 .pvr_value = 0x00390000,
159 .cpu_name = "PPC970",
160 .cpu_features = CPU_FTRS_PPC970,
a7ddc5e8 161 .cpu_user_features = COMMON_USER_POWER4 |
4920960f 162 PPC_FEATURE_HAS_ALTIVEC_COMP,
44ae3ab3 163 .mmu_features = MMU_FTRS_PPC970,
4920960f
SR
164 .icache_bsize = 128,
165 .dcache_bsize = 128,
166 .num_pmcs = 8,
1bd2e5ae 167 .pmc_type = PPC_PMC_IBM,
4920960f 168 .cpu_setup = __setup_cpu_ppc970,
f39b7a55 169 .cpu_restore = __restore_cpu_ppc970,
4920960f 170 .oprofile_cpu_type = "ppc64/970",
7a45fb19 171 .oprofile_type = PPC_OPROFILE_POWER4,
80f15dc7 172 .platform = "ppc970",
4920960f 173 },
4920960f
SR
174 { /* PPC970FX */
175 .pvr_mask = 0xffff0000,
176 .pvr_value = 0x003c0000,
177 .cpu_name = "PPC970FX",
4920960f 178 .cpu_features = CPU_FTRS_PPC970,
a7ddc5e8 179 .cpu_user_features = COMMON_USER_POWER4 |
4920960f 180 PPC_FEATURE_HAS_ALTIVEC_COMP,
44ae3ab3 181 .mmu_features = MMU_FTRS_PPC970,
4920960f
SR
182 .icache_bsize = 128,
183 .dcache_bsize = 128,
184 .num_pmcs = 8,
1bd2e5ae 185 .pmc_type = PPC_PMC_IBM,
4920960f 186 .cpu_setup = __setup_cpu_ppc970,
f39b7a55 187 .cpu_restore = __restore_cpu_ppc970,
4920960f 188 .oprofile_cpu_type = "ppc64/970",
7a45fb19 189 .oprofile_type = PPC_OPROFILE_POWER4,
80f15dc7 190 .platform = "ppc970",
3546e811
OJ
191 },
192 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
193 .pvr_mask = 0xffffffff,
194 .pvr_value = 0x00440100,
195 .cpu_name = "PPC970MP",
196 .cpu_features = CPU_FTRS_PPC970,
197 .cpu_user_features = COMMON_USER_POWER4 |
198 PPC_FEATURE_HAS_ALTIVEC_COMP,
d63ac5f6 199 .mmu_features = MMU_FTRS_PPC970,
3546e811
OJ
200 .icache_bsize = 128,
201 .dcache_bsize = 128,
202 .num_pmcs = 8,
2fae4985 203 .pmc_type = PPC_PMC_IBM,
3546e811
OJ
204 .cpu_setup = __setup_cpu_ppc970,
205 .cpu_restore = __restore_cpu_ppc970,
206 .oprofile_cpu_type = "ppc64/970MP",
207 .oprofile_type = PPC_OPROFILE_POWER4,
208 .platform = "ppc970",
4920960f 209 },
4920960f
SR
210 { /* PPC970MP */
211 .pvr_mask = 0xffff0000,
212 .pvr_value = 0x00440000,
213 .cpu_name = "PPC970MP",
214 .cpu_features = CPU_FTRS_PPC970,
a7ddc5e8 215 .cpu_user_features = COMMON_USER_POWER4 |
4920960f 216 PPC_FEATURE_HAS_ALTIVEC_COMP,
44ae3ab3 217 .mmu_features = MMU_FTRS_PPC970,
4920960f
SR
218 .icache_bsize = 128,
219 .dcache_bsize = 128,
87af41be 220 .num_pmcs = 8,
2fae4985 221 .pmc_type = PPC_PMC_IBM,
5b43d20a 222 .cpu_setup = __setup_cpu_ppc970MP,
f39b7a55 223 .cpu_restore = __restore_cpu_ppc970,
fecb352f 224 .oprofile_cpu_type = "ppc64/970MP",
7a45fb19 225 .oprofile_type = PPC_OPROFILE_POWER4,
80f15dc7 226 .platform = "ppc970",
4920960f 227 },
362ff7b2
JM
228 { /* PPC970GX */
229 .pvr_mask = 0xffff0000,
230 .pvr_value = 0x00450000,
231 .cpu_name = "PPC970GX",
232 .cpu_features = CPU_FTRS_PPC970,
233 .cpu_user_features = COMMON_USER_POWER4 |
234 PPC_FEATURE_HAS_ALTIVEC_COMP,
44ae3ab3 235 .mmu_features = MMU_FTRS_PPC970,
362ff7b2
JM
236 .icache_bsize = 128,
237 .dcache_bsize = 128,
238 .num_pmcs = 8,
1bd2e5ae 239 .pmc_type = PPC_PMC_IBM,
362ff7b2
JM
240 .cpu_setup = __setup_cpu_ppc970,
241 .oprofile_cpu_type = "ppc64/970",
242 .oprofile_type = PPC_OPROFILE_POWER4,
243 .platform = "ppc970",
244 },
3c726f8d 245 { /* Power5 GR */
4920960f
SR
246 .pvr_mask = 0xffff0000,
247 .pvr_value = 0x003a0000,
248 .cpu_name = "POWER5 (gr)",
249 .cpu_features = CPU_FTRS_POWER5,
a7ddc5e8 250 .cpu_user_features = COMMON_USER_POWER5,
44ae3ab3 251 .mmu_features = MMU_FTRS_POWER5,
4920960f
SR
252 .icache_bsize = 128,
253 .dcache_bsize = 128,
254 .num_pmcs = 6,
1bd2e5ae 255 .pmc_type = PPC_PMC_IBM,
4920960f 256 .oprofile_cpu_type = "ppc64/power5",
7a45fb19 257 .oprofile_type = PPC_OPROFILE_POWER4,
e78dbc80
MN
258 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
259 * and above but only works on POWER5 and above
260 */
261 .oprofile_mmcra_sihv = MMCRA_SIHV,
262 .oprofile_mmcra_sipr = MMCRA_SIPR,
80f15dc7 263 .platform = "power5",
4920960f 264 },
31a12cec
MW
265 { /* Power5++ */
266 .pvr_mask = 0xffffff00,
267 .pvr_value = 0x003b0300,
268 .cpu_name = "POWER5+ (gs)",
269 .cpu_features = CPU_FTRS_POWER5,
270 .cpu_user_features = COMMON_USER_POWER5_PLUS,
44ae3ab3 271 .mmu_features = MMU_FTRS_POWER5,
31a12cec
MW
272 .icache_bsize = 128,
273 .dcache_bsize = 128,
274 .num_pmcs = 6,
275 .oprofile_cpu_type = "ppc64/power5++",
276 .oprofile_type = PPC_OPROFILE_POWER4,
277 .oprofile_mmcra_sihv = MMCRA_SIHV,
278 .oprofile_mmcra_sipr = MMCRA_SIPR,
279 .platform = "power5+",
280 },
3c726f8d 281 { /* Power5 GS */
4920960f
SR
282 .pvr_mask = 0xffff0000,
283 .pvr_value = 0x003b0000,
834608f7 284 .cpu_name = "POWER5+ (gs)",
4920960f 285 .cpu_features = CPU_FTRS_POWER5,
a7ddc5e8 286 .cpu_user_features = COMMON_USER_POWER5_PLUS,
44ae3ab3 287 .mmu_features = MMU_FTRS_POWER5,
4920960f
SR
288 .icache_bsize = 128,
289 .dcache_bsize = 128,
290 .num_pmcs = 6,
1bd2e5ae 291 .pmc_type = PPC_PMC_IBM,
834608f7 292 .oprofile_cpu_type = "ppc64/power5+",
7a45fb19 293 .oprofile_type = PPC_OPROFILE_POWER4,
e78dbc80
MN
294 .oprofile_mmcra_sihv = MMCRA_SIHV,
295 .oprofile_mmcra_sipr = MMCRA_SIPR,
80f15dc7 296 .platform = "power5+",
4920960f 297 },
974a76f5
PM
298 { /* POWER6 in P5+ mode; 2.04-compliant processor */
299 .pvr_mask = 0xffffffff,
300 .pvr_value = 0x0f000001,
301 .cpu_name = "POWER5+",
302 .cpu_features = CPU_FTRS_POWER5,
303 .cpu_user_features = COMMON_USER_POWER5_PLUS,
44ae3ab3 304 .mmu_features = MMU_FTRS_POWER5,
974a76f5
PM
305 .icache_bsize = 128,
306 .dcache_bsize = 128,
79af6c49
MW
307 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
308 .oprofile_type = PPC_OPROFILE_POWER4,
974a76f5
PM
309 .platform = "power5+",
310 },
03054d51
AB
311 { /* Power6 */
312 .pvr_mask = 0xffff0000,
313 .pvr_value = 0x003e0000,
974a76f5
PM
314 .cpu_name = "POWER6 (raw)",
315 .cpu_features = CPU_FTRS_POWER6,
316 .cpu_user_features = COMMON_USER_POWER6 |
317 PPC_FEATURE_POWER6_EXT,
44ae3ab3 318 .mmu_features = MMU_FTRS_POWER6,
974a76f5
PM
319 .icache_bsize = 128,
320 .dcache_bsize = 128,
321 .num_pmcs = 6,
2fae4985 322 .pmc_type = PPC_PMC_IBM,
974a76f5
PM
323 .oprofile_cpu_type = "ppc64/power6",
324 .oprofile_type = PPC_OPROFILE_POWER4,
325 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
326 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
327 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
328 POWER6_MMCRA_OTHER,
329 .platform = "power6x",
330 },
331 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
332 .pvr_mask = 0xffffffff,
333 .pvr_value = 0x0f000002,
334 .cpu_name = "POWER6 (architected)",
03054d51
AB
335 .cpu_features = CPU_FTRS_POWER6,
336 .cpu_user_features = COMMON_USER_POWER6,
44ae3ab3 337 .mmu_features = MMU_FTRS_POWER6,
03054d51
AB
338 .icache_bsize = 128,
339 .dcache_bsize = 128,
79af6c49
MW
340 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
341 .oprofile_type = PPC_OPROFILE_POWER4,
03054d51
AB
342 .platform = "power6",
343 },
635f5a63
JS
344 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
345 .pvr_mask = 0xffffffff,
346 .pvr_value = 0x0f000003,
347 .cpu_name = "POWER7 (architected)",
348 .cpu_features = CPU_FTRS_POWER7,
349 .cpu_user_features = COMMON_USER_POWER7,
4a1ae4f3 350 .cpu_user_features2 = COMMON_USER2_POWER7,
44ae3ab3 351 .mmu_features = MMU_FTRS_POWER7,
635f5a63
JS
352 .icache_bsize = 128,
353 .dcache_bsize = 128,
79af6c49
MW
354 .oprofile_type = PPC_OPROFILE_POWER4,
355 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
24cc67de
BH
356 .cpu_setup = __setup_cpu_power7,
357 .cpu_restore = __restore_cpu_power7,
04407050 358 .flush_tlb = __flush_tlb_power7,
e22a2274 359 .machine_check_early = __machine_check_early_realmode_p7,
635f5a63
JS
360 .platform = "power7",
361 },
c674e703
MN
362 { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
363 .pvr_mask = 0xffffffff,
364 .pvr_value = 0x0f000004,
365 .cpu_name = "POWER8 (architected)",
366 .cpu_features = CPU_FTRS_POWER8,
367 .cpu_user_features = COMMON_USER_POWER8,
748645bf 368 .cpu_user_features2 = COMMON_USER2_POWER8,
c674e703
MN
369 .mmu_features = MMU_FTRS_POWER8,
370 .icache_bsize = 128,
371 .dcache_bsize = 128,
6a60f9e7
MN
372 .oprofile_type = PPC_OPROFILE_INVALID,
373 .oprofile_cpu_type = "ppc64/ibm-compat-v1",
c674e703
MN
374 .cpu_setup = __setup_cpu_power8,
375 .cpu_restore = __restore_cpu_power8,
04407050 376 .flush_tlb = __flush_tlb_power8,
ae744f34 377 .machine_check_early = __machine_check_early_realmode_p8,
c674e703
MN
378 .platform = "power8",
379 },
e952e6c4
MN
380 { /* Power7 */
381 .pvr_mask = 0xffff0000,
382 .pvr_value = 0x003f0000,
635f5a63 383 .cpu_name = "POWER7 (raw)",
e952e6c4
MN
384 .cpu_features = CPU_FTRS_POWER7,
385 .cpu_user_features = COMMON_USER_POWER7,
4a1ae4f3 386 .cpu_user_features2 = COMMON_USER2_POWER7,
44ae3ab3 387 .mmu_features = MMU_FTRS_POWER7,
e952e6c4
MN
388 .icache_bsize = 128,
389 .dcache_bsize = 128,
390 .num_pmcs = 6,
391 .pmc_type = PPC_PMC_IBM,
e952e6c4
MN
392 .oprofile_cpu_type = "ppc64/power7",
393 .oprofile_type = PPC_OPROFILE_POWER4,
24cc67de
BH
394 .cpu_setup = __setup_cpu_power7,
395 .cpu_restore = __restore_cpu_power7,
04407050 396 .flush_tlb = __flush_tlb_power7,
e22a2274 397 .machine_check_early = __machine_check_early_realmode_p7,
e952e6c4
MN
398 .platform = "power7",
399 },
6f08cb3b
MN
400 { /* Power7+ */
401 .pvr_mask = 0xffff0000,
402 .pvr_value = 0x004A0000,
403 .cpu_name = "POWER7+ (raw)",
404 .cpu_features = CPU_FTRS_POWER7,
405 .cpu_user_features = COMMON_USER_POWER7,
badec11b 406 .cpu_user_features2 = COMMON_USER2_POWER7,
44ae3ab3 407 .mmu_features = MMU_FTRS_POWER7,
6f08cb3b
MN
408 .icache_bsize = 128,
409 .dcache_bsize = 128,
410 .num_pmcs = 6,
411 .pmc_type = PPC_PMC_IBM,
412 .oprofile_cpu_type = "ppc64/power7",
413 .oprofile_type = PPC_OPROFILE_POWER4,
24cc67de
BH
414 .cpu_setup = __setup_cpu_power7,
415 .cpu_restore = __restore_cpu_power7,
04407050 416 .flush_tlb = __flush_tlb_power7,
e22a2274 417 .machine_check_early = __machine_check_early_realmode_p7,
6f08cb3b
MN
418 .platform = "power7+",
419 },
33959f88 420 { /* Power8E */
71e18497
MN
421 .pvr_mask = 0xffff0000,
422 .pvr_value = 0x004b0000,
33959f88 423 .cpu_name = "POWER8E (raw)",
68f2f0d4 424 .cpu_features = CPU_FTRS_POWER8E,
33959f88 425 .cpu_user_features = COMMON_USER_POWER8,
bd6ba351
JS
426 .cpu_user_features2 = COMMON_USER2_POWER8,
427 .mmu_features = MMU_FTRS_POWER8,
428 .icache_bsize = 128,
429 .dcache_bsize = 128,
430 .num_pmcs = 6,
431 .pmc_type = PPC_PMC_IBM,
432 .oprofile_cpu_type = "ppc64/power8",
433 .oprofile_type = PPC_OPROFILE_INVALID,
434 .cpu_setup = __setup_cpu_power8,
435 .cpu_restore = __restore_cpu_power8,
436 .flush_tlb = __flush_tlb_power8,
437 .machine_check_early = __machine_check_early_realmode_p8,
438 .platform = "power8",
439 },
ddee09c0
BH
440 { /* Power8NVL */
441 .pvr_mask = 0xffff0000,
442 .pvr_value = 0x004c0000,
443 .cpu_name = "POWER8NVL (raw)",
444 .cpu_features = CPU_FTRS_POWER8,
445 .cpu_user_features = COMMON_USER_POWER8,
446 .cpu_user_features2 = COMMON_USER2_POWER8,
447 .mmu_features = MMU_FTRS_POWER8,
448 .icache_bsize = 128,
449 .dcache_bsize = 128,
450 .num_pmcs = 6,
451 .pmc_type = PPC_PMC_IBM,
452 .oprofile_cpu_type = "ppc64/power8",
453 .oprofile_type = PPC_OPROFILE_INVALID,
454 .cpu_setup = __setup_cpu_power8,
455 .cpu_restore = __restore_cpu_power8,
456 .flush_tlb = __flush_tlb_power8,
457 .machine_check_early = __machine_check_early_realmode_p8,
458 .platform = "power8",
459 },
bd6ba351
JS
460 { /* Power8 DD1: Does not support doorbell IPIs */
461 .pvr_mask = 0xffffff00,
462 .pvr_value = 0x004d0100,
463 .cpu_name = "POWER8 (raw)",
464 .cpu_features = CPU_FTRS_POWER8_DD1,
465 .cpu_user_features = COMMON_USER_POWER8,
33959f88
MN
466 .cpu_user_features2 = COMMON_USER2_POWER8,
467 .mmu_features = MMU_FTRS_POWER8,
468 .icache_bsize = 128,
469 .dcache_bsize = 128,
470 .num_pmcs = 6,
471 .pmc_type = PPC_PMC_IBM,
472 .oprofile_cpu_type = "ppc64/power8",
473 .oprofile_type = PPC_OPROFILE_INVALID,
474 .cpu_setup = __setup_cpu_power8,
475 .cpu_restore = __restore_cpu_power8,
04407050 476 .flush_tlb = __flush_tlb_power8,
ae744f34 477 .machine_check_early = __machine_check_early_realmode_p8,
33959f88
MN
478 .platform = "power8",
479 },
480 { /* Power8 */
481 .pvr_mask = 0xffff0000,
482 .pvr_value = 0x004d0000,
71e18497
MN
483 .cpu_name = "POWER8 (raw)",
484 .cpu_features = CPU_FTRS_POWER8,
485 .cpu_user_features = COMMON_USER_POWER8,
748645bf 486 .cpu_user_features2 = COMMON_USER2_POWER8,
71e18497
MN
487 .mmu_features = MMU_FTRS_POWER8,
488 .icache_bsize = 128,
489 .dcache_bsize = 128,
490 .num_pmcs = 6,
491 .pmc_type = PPC_PMC_IBM,
6a60f9e7
MN
492 .oprofile_cpu_type = "ppc64/power8",
493 .oprofile_type = PPC_OPROFILE_INVALID,
71e18497
MN
494 .cpu_setup = __setup_cpu_power8,
495 .cpu_restore = __restore_cpu_power8,
04407050 496 .flush_tlb = __flush_tlb_power8,
ae744f34 497 .machine_check_early = __machine_check_early_realmode_p8,
71e18497
MN
498 .platform = "power8",
499 },
c902be71 500 { /* Cell Broadband Engine */
4920960f
SR
501 .pvr_mask = 0xffff0000,
502 .pvr_value = 0x00700000,
503 .cpu_name = "Cell Broadband Engine",
504 .cpu_features = CPU_FTRS_CELL,
505 .cpu_user_features = COMMON_USER_PPC64 |
aa5cb021
BH
506 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
507 PPC_FEATURE_SMT,
44ae3ab3 508 .mmu_features = MMU_FTRS_CELL,
4920960f
SR
509 .icache_bsize = 128,
510 .dcache_bsize = 128,
18f2190d 511 .num_pmcs = 4,
1bd2e5ae 512 .pmc_type = PPC_PMC_IBM,
18f2190d
MJ
513 .oprofile_cpu_type = "ppc64/cell-be",
514 .oprofile_type = PPC_OPROFILE_CELL,
80f15dc7 515 .platform = "ppc-cell-be",
4920960f 516 },
b3ebd1d8
OJ
517 { /* PA Semi PA6T */
518 .pvr_mask = 0x7fff0000,
519 .pvr_value = 0x00900000,
520 .cpu_name = "PA6T",
521 .cpu_features = CPU_FTRS_PA6T,
522 .cpu_user_features = COMMON_USER_PA6T,
44ae3ab3 523 .mmu_features = MMU_FTRS_PA6T,
b3ebd1d8
OJ
524 .icache_bsize = 64,
525 .dcache_bsize = 64,
526 .num_pmcs = 6,
1bd2e5ae 527 .pmc_type = PPC_PMC_PA6T,
1199919b
OJ
528 .cpu_setup = __setup_cpu_pa6t,
529 .cpu_restore = __restore_cpu_pa6t,
25fc530e
OJ
530 .oprofile_cpu_type = "ppc64/pa6t",
531 .oprofile_type = PPC_OPROFILE_PA6T,
b3ebd1d8
OJ
532 .platform = "pa6t",
533 },
4920960f
SR
534 { /* default match */
535 .pvr_mask = 0x00000000,
536 .pvr_value = 0x00000000,
537 .cpu_name = "POWER4 (compatible)",
538 .cpu_features = CPU_FTRS_COMPATIBLE,
539 .cpu_user_features = COMMON_USER_PPC64,
44ae3ab3 540 .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
4920960f
SR
541 .icache_bsize = 128,
542 .dcache_bsize = 128,
543 .num_pmcs = 6,
1bd2e5ae 544 .pmc_type = PPC_PMC_IBM,
80f15dc7 545 .platform = "power4",
4920960f 546 }
2d27cfd3 547#endif /* CONFIG_PPC_BOOK3S_64 */
2d27cfd3 548
4920960f 549#ifdef CONFIG_PPC32
1e07a0a0 550#ifdef CONFIG_PPC_BOOK3S_32
4920960f 551 { /* 601 */
1da177e4
LT
552 .pvr_mask = 0xffff0000,
553 .pvr_value = 0x00010000,
554 .cpu_name = "601",
10b35d99 555 .cpu_features = CPU_FTRS_PPC601,
4920960f 556 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
d8e998c5 557 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
7c03d653 558 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
559 .icache_bsize = 32,
560 .dcache_bsize = 32,
47c0bd1a 561 .machine_check = machine_check_generic,
80f15dc7 562 .platform = "ppc601",
1da177e4
LT
563 },
564 { /* 603 */
565 .pvr_mask = 0xffff0000,
566 .pvr_value = 0x00030000,
567 .cpu_name = "603",
10b35d99 568 .cpu_features = CPU_FTRS_603,
fab5db97 569 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 570 .mmu_features = 0,
1da177e4
LT
571 .icache_bsize = 32,
572 .dcache_bsize = 32,
80f15dc7 573 .cpu_setup = __setup_cpu_603,
47c0bd1a 574 .machine_check = machine_check_generic,
80f15dc7 575 .platform = "ppc603",
1da177e4
LT
576 },
577 { /* 603e */
578 .pvr_mask = 0xffff0000,
579 .pvr_value = 0x00060000,
580 .cpu_name = "603e",
10b35d99 581 .cpu_features = CPU_FTRS_603,
fab5db97 582 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 583 .mmu_features = 0,
1da177e4
LT
584 .icache_bsize = 32,
585 .dcache_bsize = 32,
80f15dc7 586 .cpu_setup = __setup_cpu_603,
47c0bd1a 587 .machine_check = machine_check_generic,
80f15dc7 588 .platform = "ppc603",
1da177e4
LT
589 },
590 { /* 603ev */
591 .pvr_mask = 0xffff0000,
592 .pvr_value = 0x00070000,
593 .cpu_name = "603ev",
10b35d99 594 .cpu_features = CPU_FTRS_603,
fab5db97 595 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 596 .mmu_features = 0,
1da177e4
LT
597 .icache_bsize = 32,
598 .dcache_bsize = 32,
80f15dc7 599 .cpu_setup = __setup_cpu_603,
47c0bd1a 600 .machine_check = machine_check_generic,
80f15dc7 601 .platform = "ppc603",
1da177e4
LT
602 },
603 { /* 604 */
604 .pvr_mask = 0xffff0000,
605 .pvr_value = 0x00040000,
606 .cpu_name = "604",
10b35d99 607 .cpu_features = CPU_FTRS_604,
fab5db97 608 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 609 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
610 .icache_bsize = 32,
611 .dcache_bsize = 32,
612 .num_pmcs = 2,
80f15dc7 613 .cpu_setup = __setup_cpu_604,
47c0bd1a 614 .machine_check = machine_check_generic,
80f15dc7 615 .platform = "ppc604",
1da177e4
LT
616 },
617 { /* 604e */
618 .pvr_mask = 0xfffff000,
619 .pvr_value = 0x00090000,
620 .cpu_name = "604e",
10b35d99 621 .cpu_features = CPU_FTRS_604,
fab5db97 622 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 623 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
624 .icache_bsize = 32,
625 .dcache_bsize = 32,
626 .num_pmcs = 4,
80f15dc7 627 .cpu_setup = __setup_cpu_604,
47c0bd1a 628 .machine_check = machine_check_generic,
80f15dc7 629 .platform = "ppc604",
1da177e4
LT
630 },
631 { /* 604r */
632 .pvr_mask = 0xffff0000,
633 .pvr_value = 0x00090000,
634 .cpu_name = "604r",
10b35d99 635 .cpu_features = CPU_FTRS_604,
fab5db97 636 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 637 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
638 .icache_bsize = 32,
639 .dcache_bsize = 32,
640 .num_pmcs = 4,
80f15dc7 641 .cpu_setup = __setup_cpu_604,
47c0bd1a 642 .machine_check = machine_check_generic,
80f15dc7 643 .platform = "ppc604",
1da177e4
LT
644 },
645 { /* 604ev */
646 .pvr_mask = 0xffff0000,
647 .pvr_value = 0x000a0000,
648 .cpu_name = "604ev",
10b35d99 649 .cpu_features = CPU_FTRS_604,
fab5db97 650 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 651 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
652 .icache_bsize = 32,
653 .dcache_bsize = 32,
654 .num_pmcs = 4,
80f15dc7 655 .cpu_setup = __setup_cpu_604,
47c0bd1a 656 .machine_check = machine_check_generic,
80f15dc7 657 .platform = "ppc604",
1da177e4
LT
658 },
659 { /* 740/750 (0x4202, don't support TAU ?) */
660 .pvr_mask = 0xffffffff,
661 .pvr_value = 0x00084202,
662 .cpu_name = "740/750",
10b35d99 663 .cpu_features = CPU_FTRS_740_NOTAU,
fab5db97 664 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 665 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
666 .icache_bsize = 32,
667 .dcache_bsize = 32,
668 .num_pmcs = 4,
80f15dc7 669 .cpu_setup = __setup_cpu_750,
47c0bd1a 670 .machine_check = machine_check_generic,
80f15dc7 671 .platform = "ppc750",
1da177e4 672 },
1da177e4
LT
673 { /* 750CX (80100 and 8010x?) */
674 .pvr_mask = 0xfffffff0,
675 .pvr_value = 0x00080100,
676 .cpu_name = "750CX",
10b35d99 677 .cpu_features = CPU_FTRS_750,
fab5db97 678 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 679 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
680 .icache_bsize = 32,
681 .dcache_bsize = 32,
682 .num_pmcs = 4,
80f15dc7 683 .cpu_setup = __setup_cpu_750cx,
47c0bd1a 684 .machine_check = machine_check_generic,
80f15dc7 685 .platform = "ppc750",
1da177e4
LT
686 },
687 { /* 750CX (82201 and 82202) */
688 .pvr_mask = 0xfffffff0,
689 .pvr_value = 0x00082200,
690 .cpu_name = "750CX",
10b35d99 691 .cpu_features = CPU_FTRS_750,
fab5db97 692 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 693 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
694 .icache_bsize = 32,
695 .dcache_bsize = 32,
696 .num_pmcs = 4,
b950bdd0 697 .pmc_type = PPC_PMC_IBM,
80f15dc7 698 .cpu_setup = __setup_cpu_750cx,
47c0bd1a 699 .machine_check = machine_check_generic,
80f15dc7 700 .platform = "ppc750",
1da177e4
LT
701 },
702 { /* 750CXe (82214) */
703 .pvr_mask = 0xfffffff0,
704 .pvr_value = 0x00082210,
705 .cpu_name = "750CXe",
10b35d99 706 .cpu_features = CPU_FTRS_750,
fab5db97 707 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 708 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
709 .icache_bsize = 32,
710 .dcache_bsize = 32,
711 .num_pmcs = 4,
b950bdd0 712 .pmc_type = PPC_PMC_IBM,
80f15dc7 713 .cpu_setup = __setup_cpu_750cx,
47c0bd1a 714 .machine_check = machine_check_generic,
80f15dc7 715 .platform = "ppc750",
1da177e4 716 },
7c31625a
AO
717 { /* 750CXe "Gekko" (83214) */
718 .pvr_mask = 0xffffffff,
719 .pvr_value = 0x00083214,
720 .cpu_name = "750CXe",
10b35d99 721 .cpu_features = CPU_FTRS_750,
fab5db97 722 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 723 .mmu_features = MMU_FTR_HPTE_TABLE,
7c31625a
AO
724 .icache_bsize = 32,
725 .dcache_bsize = 32,
726 .num_pmcs = 4,
b950bdd0 727 .pmc_type = PPC_PMC_IBM,
80f15dc7 728 .cpu_setup = __setup_cpu_750cx,
47c0bd1a 729 .machine_check = machine_check_generic,
80f15dc7 730 .platform = "ppc750",
7c31625a 731 },
45158dc7
AH
732 { /* 750CL (and "Broadway") */
733 .pvr_mask = 0xfffff0e0,
734 .pvr_value = 0x00087000,
cfbff8a3 735 .cpu_name = "750CL",
a14c4508 736 .cpu_features = CPU_FTRS_750CL,
cfbff8a3 737 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 738 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
cfbff8a3
JM
739 .icache_bsize = 32,
740 .dcache_bsize = 32,
741 .num_pmcs = 4,
b950bdd0 742 .pmc_type = PPC_PMC_IBM,
a14c4508 743 .cpu_setup = __setup_cpu_750,
47c0bd1a 744 .machine_check = machine_check_generic,
cfbff8a3 745 .platform = "ppc750",
04f56534
DT
746 .oprofile_cpu_type = "ppc/750",
747 .oprofile_type = PPC_OPROFILE_G4,
cfbff8a3 748 },
ac1ff047
AO
749 { /* 745/755 */
750 .pvr_mask = 0xfffff000,
751 .pvr_value = 0x00083000,
752 .cpu_name = "745/755",
10b35d99 753 .cpu_features = CPU_FTRS_750,
fab5db97 754 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 755 .mmu_features = MMU_FTR_HPTE_TABLE,
ac1ff047
AO
756 .icache_bsize = 32,
757 .dcache_bsize = 32,
758 .num_pmcs = 4,
b950bdd0 759 .pmc_type = PPC_PMC_IBM,
80f15dc7 760 .cpu_setup = __setup_cpu_750,
47c0bd1a 761 .machine_check = machine_check_generic,
80f15dc7 762 .platform = "ppc750",
ac1ff047 763 },
1da177e4
LT
764 { /* 750FX rev 1.x */
765 .pvr_mask = 0xffffff00,
766 .pvr_value = 0x70000100,
767 .cpu_name = "750FX",
10b35d99 768 .cpu_features = CPU_FTRS_750FX1,
fab5db97 769 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 770 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
771 .icache_bsize = 32,
772 .dcache_bsize = 32,
773 .num_pmcs = 4,
b950bdd0 774 .pmc_type = PPC_PMC_IBM,
80f15dc7 775 .cpu_setup = __setup_cpu_750,
47c0bd1a 776 .machine_check = machine_check_generic,
80f15dc7 777 .platform = "ppc750",
7c9583a4
OP
778 .oprofile_cpu_type = "ppc/750",
779 .oprofile_type = PPC_OPROFILE_G4,
1da177e4
LT
780 },
781 { /* 750FX rev 2.0 must disable HID0[DPM] */
782 .pvr_mask = 0xffffffff,
783 .pvr_value = 0x70000200,
784 .cpu_name = "750FX",
10b35d99 785 .cpu_features = CPU_FTRS_750FX2,
fab5db97 786 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 787 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
788 .icache_bsize = 32,
789 .dcache_bsize = 32,
790 .num_pmcs = 4,
b950bdd0 791 .pmc_type = PPC_PMC_IBM,
80f15dc7 792 .cpu_setup = __setup_cpu_750,
47c0bd1a 793 .machine_check = machine_check_generic,
80f15dc7 794 .platform = "ppc750",
7c9583a4
OP
795 .oprofile_cpu_type = "ppc/750",
796 .oprofile_type = PPC_OPROFILE_G4,
1da177e4
LT
797 },
798 { /* 750FX (All revs except 2.0) */
799 .pvr_mask = 0xffff0000,
800 .pvr_value = 0x70000000,
801 .cpu_name = "750FX",
10b35d99 802 .cpu_features = CPU_FTRS_750FX,
fab5db97 803 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 804 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
805 .icache_bsize = 32,
806 .dcache_bsize = 32,
807 .num_pmcs = 4,
b950bdd0 808 .pmc_type = PPC_PMC_IBM,
80f15dc7 809 .cpu_setup = __setup_cpu_750fx,
47c0bd1a 810 .machine_check = machine_check_generic,
80f15dc7 811 .platform = "ppc750",
7c9583a4
OP
812 .oprofile_cpu_type = "ppc/750",
813 .oprofile_type = PPC_OPROFILE_G4,
1da177e4
LT
814 },
815 { /* 750GX */
816 .pvr_mask = 0xffff0000,
817 .pvr_value = 0x70020000,
818 .cpu_name = "750GX",
10b35d99 819 .cpu_features = CPU_FTRS_750GX,
fab5db97 820 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 821 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
822 .icache_bsize = 32,
823 .dcache_bsize = 32,
824 .num_pmcs = 4,
b950bdd0 825 .pmc_type = PPC_PMC_IBM,
80f15dc7 826 .cpu_setup = __setup_cpu_750fx,
47c0bd1a 827 .machine_check = machine_check_generic,
80f15dc7 828 .platform = "ppc750",
7c9583a4
OP
829 .oprofile_cpu_type = "ppc/750",
830 .oprofile_type = PPC_OPROFILE_G4,
1da177e4
LT
831 },
832 { /* 740/750 (L2CR bit need fixup for 740) */
833 .pvr_mask = 0xffff0000,
834 .pvr_value = 0x00080000,
835 .cpu_name = "740/750",
10b35d99 836 .cpu_features = CPU_FTRS_740,
fab5db97 837 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
7c03d653 838 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
839 .icache_bsize = 32,
840 .dcache_bsize = 32,
841 .num_pmcs = 4,
b950bdd0 842 .pmc_type = PPC_PMC_IBM,
80f15dc7 843 .cpu_setup = __setup_cpu_750,
47c0bd1a 844 .machine_check = machine_check_generic,
80f15dc7 845 .platform = "ppc750",
1da177e4
LT
846 },
847 { /* 7400 rev 1.1 ? (no TAU) */
848 .pvr_mask = 0xffffffff,
849 .pvr_value = 0x000c1101,
850 .cpu_name = "7400 (1.1)",
10b35d99 851 .cpu_features = CPU_FTRS_7400_NOTAU,
fab5db97
PM
852 .cpu_user_features = COMMON_USER |
853 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 854 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
855 .icache_bsize = 32,
856 .dcache_bsize = 32,
857 .num_pmcs = 4,
b950bdd0 858 .pmc_type = PPC_PMC_G4,
80f15dc7 859 .cpu_setup = __setup_cpu_7400,
47c0bd1a 860 .machine_check = machine_check_generic,
80f15dc7 861 .platform = "ppc7400",
1da177e4
LT
862 },
863 { /* 7400 */
864 .pvr_mask = 0xffff0000,
865 .pvr_value = 0x000c0000,
866 .cpu_name = "7400",
10b35d99 867 .cpu_features = CPU_FTRS_7400,
fab5db97
PM
868 .cpu_user_features = COMMON_USER |
869 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 870 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
871 .icache_bsize = 32,
872 .dcache_bsize = 32,
873 .num_pmcs = 4,
b950bdd0 874 .pmc_type = PPC_PMC_G4,
80f15dc7 875 .cpu_setup = __setup_cpu_7400,
47c0bd1a 876 .machine_check = machine_check_generic,
80f15dc7 877 .platform = "ppc7400",
1da177e4
LT
878 },
879 { /* 7410 */
880 .pvr_mask = 0xffff0000,
881 .pvr_value = 0x800c0000,
882 .cpu_name = "7410",
10b35d99 883 .cpu_features = CPU_FTRS_7400,
fab5db97
PM
884 .cpu_user_features = COMMON_USER |
885 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 886 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
887 .icache_bsize = 32,
888 .dcache_bsize = 32,
889 .num_pmcs = 4,
b950bdd0 890 .pmc_type = PPC_PMC_G4,
80f15dc7 891 .cpu_setup = __setup_cpu_7410,
47c0bd1a 892 .machine_check = machine_check_generic,
80f15dc7 893 .platform = "ppc7400",
1da177e4
LT
894 },
895 { /* 7450 2.0 - no doze/nap */
896 .pvr_mask = 0xffffffff,
897 .pvr_value = 0x80000200,
898 .cpu_name = "7450",
10b35d99 899 .cpu_features = CPU_FTRS_7450_20,
fab5db97
PM
900 .cpu_user_features = COMMON_USER |
901 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 902 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
903 .icache_bsize = 32,
904 .dcache_bsize = 32,
905 .num_pmcs = 6,
b950bdd0 906 .pmc_type = PPC_PMC_G4,
555d97ac 907 .cpu_setup = __setup_cpu_745x,
555d97ac 908 .oprofile_cpu_type = "ppc/7450",
7a45fb19 909 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 910 .machine_check = machine_check_generic,
80f15dc7 911 .platform = "ppc7450",
1da177e4
LT
912 },
913 { /* 7450 2.1 */
914 .pvr_mask = 0xffffffff,
915 .pvr_value = 0x80000201,
916 .cpu_name = "7450",
10b35d99 917 .cpu_features = CPU_FTRS_7450_21,
fab5db97
PM
918 .cpu_user_features = COMMON_USER |
919 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 920 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
921 .icache_bsize = 32,
922 .dcache_bsize = 32,
923 .num_pmcs = 6,
b950bdd0 924 .pmc_type = PPC_PMC_G4,
555d97ac 925 .cpu_setup = __setup_cpu_745x,
555d97ac 926 .oprofile_cpu_type = "ppc/7450",
7a45fb19 927 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 928 .machine_check = machine_check_generic,
80f15dc7 929 .platform = "ppc7450",
1da177e4
LT
930 },
931 { /* 7450 2.3 and newer */
932 .pvr_mask = 0xffff0000,
933 .pvr_value = 0x80000000,
934 .cpu_name = "7450",
10b35d99 935 .cpu_features = CPU_FTRS_7450_23,
fab5db97
PM
936 .cpu_user_features = COMMON_USER |
937 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 938 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
939 .icache_bsize = 32,
940 .dcache_bsize = 32,
941 .num_pmcs = 6,
b950bdd0 942 .pmc_type = PPC_PMC_G4,
555d97ac 943 .cpu_setup = __setup_cpu_745x,
555d97ac 944 .oprofile_cpu_type = "ppc/7450",
7a45fb19 945 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 946 .machine_check = machine_check_generic,
80f15dc7 947 .platform = "ppc7450",
1da177e4
LT
948 },
949 { /* 7455 rev 1.x */
950 .pvr_mask = 0xffffff00,
951 .pvr_value = 0x80010100,
952 .cpu_name = "7455",
10b35d99 953 .cpu_features = CPU_FTRS_7455_1,
fab5db97
PM
954 .cpu_user_features = COMMON_USER |
955 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 956 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
957 .icache_bsize = 32,
958 .dcache_bsize = 32,
959 .num_pmcs = 6,
b950bdd0 960 .pmc_type = PPC_PMC_G4,
555d97ac 961 .cpu_setup = __setup_cpu_745x,
555d97ac 962 .oprofile_cpu_type = "ppc/7450",
7a45fb19 963 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 964 .machine_check = machine_check_generic,
80f15dc7 965 .platform = "ppc7450",
1da177e4
LT
966 },
967 { /* 7455 rev 2.0 */
968 .pvr_mask = 0xffffffff,
969 .pvr_value = 0x80010200,
970 .cpu_name = "7455",
10b35d99 971 .cpu_features = CPU_FTRS_7455_20,
fab5db97
PM
972 .cpu_user_features = COMMON_USER |
973 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 974 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
975 .icache_bsize = 32,
976 .dcache_bsize = 32,
977 .num_pmcs = 6,
b950bdd0 978 .pmc_type = PPC_PMC_G4,
555d97ac 979 .cpu_setup = __setup_cpu_745x,
555d97ac 980 .oprofile_cpu_type = "ppc/7450",
7a45fb19 981 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 982 .machine_check = machine_check_generic,
80f15dc7 983 .platform = "ppc7450",
1da177e4
LT
984 },
985 { /* 7455 others */
986 .pvr_mask = 0xffff0000,
987 .pvr_value = 0x80010000,
988 .cpu_name = "7455",
10b35d99 989 .cpu_features = CPU_FTRS_7455,
fab5db97
PM
990 .cpu_user_features = COMMON_USER |
991 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 992 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
993 .icache_bsize = 32,
994 .dcache_bsize = 32,
995 .num_pmcs = 6,
b950bdd0 996 .pmc_type = PPC_PMC_G4,
555d97ac 997 .cpu_setup = __setup_cpu_745x,
555d97ac 998 .oprofile_cpu_type = "ppc/7450",
7a45fb19 999 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1000 .machine_check = machine_check_generic,
80f15dc7 1001 .platform = "ppc7450",
1da177e4
LT
1002 },
1003 { /* 7447/7457 Rev 1.0 */
1004 .pvr_mask = 0xffffffff,
1005 .pvr_value = 0x80020100,
1006 .cpu_name = "7447/7457",
10b35d99 1007 .cpu_features = CPU_FTRS_7447_10,
fab5db97
PM
1008 .cpu_user_features = COMMON_USER |
1009 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1010 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1011 .icache_bsize = 32,
1012 .dcache_bsize = 32,
1013 .num_pmcs = 6,
b950bdd0 1014 .pmc_type = PPC_PMC_G4,
555d97ac 1015 .cpu_setup = __setup_cpu_745x,
555d97ac 1016 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1017 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1018 .machine_check = machine_check_generic,
80f15dc7 1019 .platform = "ppc7450",
1da177e4
LT
1020 },
1021 { /* 7447/7457 Rev 1.1 */
1022 .pvr_mask = 0xffffffff,
1023 .pvr_value = 0x80020101,
1024 .cpu_name = "7447/7457",
10b35d99 1025 .cpu_features = CPU_FTRS_7447_10,
fab5db97
PM
1026 .cpu_user_features = COMMON_USER |
1027 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1028 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1029 .icache_bsize = 32,
1030 .dcache_bsize = 32,
1031 .num_pmcs = 6,
b950bdd0 1032 .pmc_type = PPC_PMC_G4,
555d97ac 1033 .cpu_setup = __setup_cpu_745x,
555d97ac 1034 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1035 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1036 .machine_check = machine_check_generic,
80f15dc7 1037 .platform = "ppc7450",
1da177e4
LT
1038 },
1039 { /* 7447/7457 Rev 1.2 and later */
1040 .pvr_mask = 0xffff0000,
1041 .pvr_value = 0x80020000,
1042 .cpu_name = "7447/7457",
10b35d99 1043 .cpu_features = CPU_FTRS_7447,
fab5db97 1044 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1045 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1046 .icache_bsize = 32,
1047 .dcache_bsize = 32,
1048 .num_pmcs = 6,
b950bdd0 1049 .pmc_type = PPC_PMC_G4,
555d97ac 1050 .cpu_setup = __setup_cpu_745x,
555d97ac 1051 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1052 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1053 .machine_check = machine_check_generic,
80f15dc7 1054 .platform = "ppc7450",
1da177e4
LT
1055 },
1056 { /* 7447A */
1057 .pvr_mask = 0xffff0000,
1058 .pvr_value = 0x80030000,
1059 .cpu_name = "7447A",
10b35d99 1060 .cpu_features = CPU_FTRS_7447A,
fab5db97
PM
1061 .cpu_user_features = COMMON_USER |
1062 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1063 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
bbde630b
KG
1064 .icache_bsize = 32,
1065 .dcache_bsize = 32,
1066 .num_pmcs = 6,
b950bdd0 1067 .pmc_type = PPC_PMC_G4,
555d97ac 1068 .cpu_setup = __setup_cpu_745x,
555d97ac 1069 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1070 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1071 .machine_check = machine_check_generic,
80f15dc7 1072 .platform = "ppc7450",
bbde630b
KG
1073 },
1074 { /* 7448 */
1075 .pvr_mask = 0xffff0000,
1076 .pvr_value = 0x80040000,
1077 .cpu_name = "7448",
3d372548 1078 .cpu_features = CPU_FTRS_7448,
fab5db97
PM
1079 .cpu_user_features = COMMON_USER |
1080 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
7c03d653 1081 .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1082 .icache_bsize = 32,
1083 .dcache_bsize = 32,
1084 .num_pmcs = 6,
b950bdd0 1085 .pmc_type = PPC_PMC_G4,
555d97ac 1086 .cpu_setup = __setup_cpu_745x,
555d97ac 1087 .oprofile_cpu_type = "ppc/7450",
7a45fb19 1088 .oprofile_type = PPC_OPROFILE_G4,
47c0bd1a 1089 .machine_check = machine_check_generic,
80f15dc7 1090 .platform = "ppc7450",
1da177e4
LT
1091 },
1092 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
1093 .pvr_mask = 0x7fff0000,
1094 .pvr_value = 0x00810000,
1095 .cpu_name = "82xx",
10b35d99 1096 .cpu_features = CPU_FTRS_82XX,
4920960f 1097 .cpu_user_features = COMMON_USER,
7c03d653 1098 .mmu_features = 0,
1da177e4
LT
1099 .icache_bsize = 32,
1100 .dcache_bsize = 32,
80f15dc7 1101 .cpu_setup = __setup_cpu_603,
47c0bd1a 1102 .machine_check = machine_check_generic,
80f15dc7 1103 .platform = "ppc603",
1da177e4
LT
1104 },
1105 { /* All G2_LE (603e core, plus some) have the same pvr */
1106 .pvr_mask = 0x7fff0000,
1107 .pvr_value = 0x00820000,
1108 .cpu_name = "G2_LE",
10b35d99 1109 .cpu_features = CPU_FTRS_G2_LE,
4920960f 1110 .cpu_user_features = COMMON_USER,
7c03d653 1111 .mmu_features = MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1112 .icache_bsize = 32,
1113 .dcache_bsize = 32,
80f15dc7 1114 .cpu_setup = __setup_cpu_603,
47c0bd1a 1115 .machine_check = machine_check_generic,
80f15dc7 1116 .platform = "ppc603",
1da177e4 1117 },
6c4a2501 1118 { /* e300c1 (a 603e core, plus some) on 83xx */
1da177e4
LT
1119 .pvr_mask = 0x7fff0000,
1120 .pvr_value = 0x00830000,
6c4a2501 1121 .cpu_name = "e300c1",
10b35d99 1122 .cpu_features = CPU_FTRS_E300,
4920960f 1123 .cpu_user_features = COMMON_USER,
7c03d653 1124 .mmu_features = MMU_FTR_USE_HIGH_BATS,
1da177e4
LT
1125 .icache_bsize = 32,
1126 .dcache_bsize = 32,
80f15dc7 1127 .cpu_setup = __setup_cpu_603,
47c0bd1a 1128 .machine_check = machine_check_generic,
80f15dc7 1129 .platform = "ppc603",
1da177e4 1130 },
6c4a2501
KP
1131 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
1132 .pvr_mask = 0x7fff0000,
1133 .pvr_value = 0x00840000,
1134 .cpu_name = "e300c2",
aa42c69c 1135 .cpu_features = CPU_FTRS_E300C2,
6c4a2501 1136 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
2319f123
KG
1137 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1138 MMU_FTR_NEED_DTLB_SW_LRU,
6c4a2501
KP
1139 .icache_bsize = 32,
1140 .dcache_bsize = 32,
1141 .cpu_setup = __setup_cpu_603,
47c0bd1a 1142 .machine_check = machine_check_generic,
6c4a2501
KP
1143 .platform = "ppc603",
1144 },
a58d5244 1145 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
57933f8f
SW
1146 .pvr_mask = 0x7fff0000,
1147 .pvr_value = 0x00850000,
1148 .cpu_name = "e300c3",
1149 .cpu_features = CPU_FTRS_E300,
1150 .cpu_user_features = COMMON_USER,
2319f123
KG
1151 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1152 MMU_FTR_NEED_DTLB_SW_LRU,
57933f8f
SW
1153 .icache_bsize = 32,
1154 .dcache_bsize = 32,
1155 .cpu_setup = __setup_cpu_603,
974ff4e2 1156 .machine_check = machine_check_generic,
1347a2c1
AF
1157 .num_pmcs = 4,
1158 .oprofile_cpu_type = "ppc/e300",
1159 .oprofile_type = PPC_OPROFILE_FSL_EMB,
57933f8f
SW
1160 .platform = "ppc603",
1161 },
a58d5244
LY
1162 { /* e300c4 (e300c1, plus one IU) */
1163 .pvr_mask = 0x7fff0000,
1164 .pvr_value = 0x00860000,
1165 .cpu_name = "e300c4",
1166 .cpu_features = CPU_FTRS_E300,
1167 .cpu_user_features = COMMON_USER,
2319f123
KG
1168 .mmu_features = MMU_FTR_USE_HIGH_BATS |
1169 MMU_FTR_NEED_DTLB_SW_LRU,
a58d5244
LY
1170 .icache_bsize = 32,
1171 .dcache_bsize = 32,
1172 .cpu_setup = __setup_cpu_603,
47c0bd1a 1173 .machine_check = machine_check_generic,
1347a2c1
AF
1174 .num_pmcs = 4,
1175 .oprofile_cpu_type = "ppc/e300",
1176 .oprofile_type = PPC_OPROFILE_FSL_EMB,
a58d5244
LY
1177 .platform = "ppc603",
1178 },
1da177e4
LT
1179 { /* default match, we assume split I/D cache & TB (non-601)... */
1180 .pvr_mask = 0x00000000,
1181 .pvr_value = 0x00000000,
1182 .cpu_name = "(generic PPC)",
10b35d99 1183 .cpu_features = CPU_FTRS_CLASSIC32,
4920960f 1184 .cpu_user_features = COMMON_USER,
7c03d653 1185 .mmu_features = MMU_FTR_HPTE_TABLE,
1da177e4
LT
1186 .icache_bsize = 32,
1187 .dcache_bsize = 32,
47c0bd1a 1188 .machine_check = machine_check_generic,
80f15dc7 1189 .platform = "ppc603",
1da177e4 1190 },
1e07a0a0 1191#endif /* CONFIG_PPC_BOOK3S_32 */
1da177e4
LT
1192#ifdef CONFIG_8xx
1193 { /* 8xx */
1194 .pvr_mask = 0xffff0000,
1195 .pvr_value = 0x00500000,
1196 .cpu_name = "8xx",
1197 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1198 * if the 8xx code is there.... */
10b35d99 1199 .cpu_features = CPU_FTRS_8XX,
1da177e4 1200 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
7c03d653 1201 .mmu_features = MMU_FTR_TYPE_8xx,
1da177e4
LT
1202 .icache_bsize = 16,
1203 .dcache_bsize = 16,
80f15dc7 1204 .platform = "ppc823",
1da177e4
LT
1205 },
1206#endif /* CONFIG_8xx */
1207#ifdef CONFIG_40x
1208 { /* 403GC */
1209 .pvr_mask = 0xffffff00,
1210 .pvr_value = 0x00200200,
1211 .cpu_name = "403GC",
10b35d99 1212 .cpu_features = CPU_FTRS_40X,
1da177e4 1213 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
7c03d653 1214 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1215 .icache_bsize = 16,
1216 .dcache_bsize = 16,
47c0bd1a 1217 .machine_check = machine_check_4xx,
80f15dc7 1218 .platform = "ppc403",
1da177e4
LT
1219 },
1220 { /* 403GCX */
1221 .pvr_mask = 0xffffff00,
1222 .pvr_value = 0x00201400,
1223 .cpu_name = "403GCX",
10b35d99 1224 .cpu_features = CPU_FTRS_40X,
d8e998c5
BH
1225 .cpu_user_features = PPC_FEATURE_32 |
1226 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
7c03d653 1227 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1228 .icache_bsize = 16,
1229 .dcache_bsize = 16,
47c0bd1a 1230 .machine_check = machine_check_4xx,
80f15dc7 1231 .platform = "ppc403",
1da177e4
LT
1232 },
1233 { /* 403G ?? */
1234 .pvr_mask = 0xffff0000,
1235 .pvr_value = 0x00200000,
1236 .cpu_name = "403G ??",
10b35d99 1237 .cpu_features = CPU_FTRS_40X,
1da177e4 1238 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
7c03d653 1239 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1240 .icache_bsize = 16,
1241 .dcache_bsize = 16,
47c0bd1a 1242 .machine_check = machine_check_4xx,
80f15dc7 1243 .platform = "ppc403",
1da177e4
LT
1244 },
1245 { /* 405GP */
1246 .pvr_mask = 0xffff0000,
1247 .pvr_value = 0x40110000,
1248 .cpu_name = "405GP",
10b35d99 1249 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1250 .cpu_user_features = PPC_FEATURE_32 |
1251 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1252 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1253 .icache_bsize = 32,
1254 .dcache_bsize = 32,
47c0bd1a 1255 .machine_check = machine_check_4xx,
80f15dc7 1256 .platform = "ppc405",
1da177e4
LT
1257 },
1258 { /* STB 03xxx */
1259 .pvr_mask = 0xffff0000,
1260 .pvr_value = 0x40130000,
1261 .cpu_name = "STB03xxx",
10b35d99 1262 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1263 .cpu_user_features = PPC_FEATURE_32 |
1264 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1265 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1266 .icache_bsize = 32,
1267 .dcache_bsize = 32,
47c0bd1a 1268 .machine_check = machine_check_4xx,
80f15dc7 1269 .platform = "ppc405",
1da177e4
LT
1270 },
1271 { /* STB 04xxx */
1272 .pvr_mask = 0xffff0000,
1273 .pvr_value = 0x41810000,
1274 .cpu_name = "STB04xxx",
10b35d99 1275 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1276 .cpu_user_features = PPC_FEATURE_32 |
1277 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1278 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1279 .icache_bsize = 32,
1280 .dcache_bsize = 32,
47c0bd1a 1281 .machine_check = machine_check_4xx,
80f15dc7 1282 .platform = "ppc405",
1da177e4
LT
1283 },
1284 { /* NP405L */
1285 .pvr_mask = 0xffff0000,
1286 .pvr_value = 0x41610000,
1287 .cpu_name = "NP405L",
10b35d99 1288 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1289 .cpu_user_features = PPC_FEATURE_32 |
1290 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1291 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1292 .icache_bsize = 32,
1293 .dcache_bsize = 32,
47c0bd1a 1294 .machine_check = machine_check_4xx,
80f15dc7 1295 .platform = "ppc405",
1da177e4
LT
1296 },
1297 { /* NP4GS3 */
1298 .pvr_mask = 0xffff0000,
1299 .pvr_value = 0x40B10000,
1300 .cpu_name = "NP4GS3",
10b35d99 1301 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1302 .cpu_user_features = PPC_FEATURE_32 |
1303 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1304 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1305 .icache_bsize = 32,
1306 .dcache_bsize = 32,
47c0bd1a 1307 .machine_check = machine_check_4xx,
80f15dc7 1308 .platform = "ppc405",
1da177e4
LT
1309 },
1310 { /* NP405H */
1311 .pvr_mask = 0xffff0000,
1312 .pvr_value = 0x41410000,
1313 .cpu_name = "NP405H",
10b35d99 1314 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1315 .cpu_user_features = PPC_FEATURE_32 |
1316 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1317 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1318 .icache_bsize = 32,
1319 .dcache_bsize = 32,
47c0bd1a 1320 .machine_check = machine_check_4xx,
80f15dc7 1321 .platform = "ppc405",
1da177e4
LT
1322 },
1323 { /* 405GPr */
1324 .pvr_mask = 0xffff0000,
1325 .pvr_value = 0x50910000,
1326 .cpu_name = "405GPr",
10b35d99 1327 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1328 .cpu_user_features = PPC_FEATURE_32 |
1329 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1330 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1331 .icache_bsize = 32,
1332 .dcache_bsize = 32,
47c0bd1a 1333 .machine_check = machine_check_4xx,
80f15dc7 1334 .platform = "ppc405",
1da177e4
LT
1335 },
1336 { /* STBx25xx */
1337 .pvr_mask = 0xffff0000,
1338 .pvr_value = 0x51510000,
1339 .cpu_name = "STBx25xx",
10b35d99 1340 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1341 .cpu_user_features = PPC_FEATURE_32 |
1342 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1343 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1344 .icache_bsize = 32,
1345 .dcache_bsize = 32,
47c0bd1a 1346 .machine_check = machine_check_4xx,
80f15dc7 1347 .platform = "ppc405",
1da177e4
LT
1348 },
1349 { /* 405LP */
1350 .pvr_mask = 0xffff0000,
1351 .pvr_value = 0x41F10000,
1352 .cpu_name = "405LP",
10b35d99 1353 .cpu_features = CPU_FTRS_40X,
1da177e4 1354 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
7c03d653 1355 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1356 .icache_bsize = 32,
1357 .dcache_bsize = 32,
47c0bd1a 1358 .machine_check = machine_check_4xx,
80f15dc7 1359 .platform = "ppc405",
1da177e4
LT
1360 },
1361 { /* Xilinx Virtex-II Pro */
72646c7f 1362 .pvr_mask = 0xfffff000,
1da177e4
LT
1363 .pvr_value = 0x20010000,
1364 .cpu_name = "Virtex-II Pro",
10b35d99 1365 .cpu_features = CPU_FTRS_40X,
1da177e4
LT
1366 .cpu_user_features = PPC_FEATURE_32 |
1367 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1368 .mmu_features = MMU_FTR_TYPE_40x,
1da177e4
LT
1369 .icache_bsize = 32,
1370 .dcache_bsize = 32,
47c0bd1a 1371 .machine_check = machine_check_4xx,
80f15dc7 1372 .platform = "ppc405",
1da177e4 1373 },
72646c7f
GL
1374 { /* Xilinx Virtex-4 FX */
1375 .pvr_mask = 0xfffff000,
1376 .pvr_value = 0x20011000,
1377 .cpu_name = "Virtex-4 FX",
1378 .cpu_features = CPU_FTRS_40X,
1379 .cpu_user_features = PPC_FEATURE_32 |
1380 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1381 .mmu_features = MMU_FTR_TYPE_40x,
72646c7f
GL
1382 .icache_bsize = 32,
1383 .dcache_bsize = 32,
47c0bd1a 1384 .machine_check = machine_check_4xx,
838fdb4d 1385 .platform = "ppc405",
72646c7f 1386 },
ad95d609
ES
1387 { /* 405EP */
1388 .pvr_mask = 0xffff0000,
1389 .pvr_value = 0x51210000,
1390 .cpu_name = "405EP",
10b35d99 1391 .cpu_features = CPU_FTRS_40X,
5d8476c8
SR
1392 .cpu_user_features = PPC_FEATURE_32 |
1393 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1394 .mmu_features = MMU_FTR_TYPE_40x,
5d8476c8
SR
1395 .icache_bsize = 32,
1396 .dcache_bsize = 32,
47c0bd1a 1397 .machine_check = machine_check_4xx,
5d8476c8
SR
1398 .platform = "ppc405",
1399 },
ff349103
LN
1400 { /* 405EX Rev. A/B with Security */
1401 .pvr_mask = 0xffff000f,
1402 .pvr_value = 0x12910007,
1403 .cpu_name = "405EX Rev. A/B",
5d8476c8 1404 .cpu_features = CPU_FTRS_40X,
ad95d609
ES
1405 .cpu_user_features = PPC_FEATURE_32 |
1406 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1407 .mmu_features = MMU_FTR_TYPE_40x,
ad95d609
ES
1408 .icache_bsize = 32,
1409 .dcache_bsize = 32,
47c0bd1a 1410 .machine_check = machine_check_4xx,
80f15dc7 1411 .platform = "ppc405",
ad95d609 1412 },
ff349103
LN
1413 { /* 405EX Rev. C without Security */
1414 .pvr_mask = 0xffff000f,
1415 .pvr_value = 0x1291000d,
1416 .cpu_name = "405EX Rev. C",
1417 .cpu_features = CPU_FTRS_40X,
1418 .cpu_user_features = PPC_FEATURE_32 |
1419 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1420 .mmu_features = MMU_FTR_TYPE_40x,
1421 .icache_bsize = 32,
1422 .dcache_bsize = 32,
1423 .machine_check = machine_check_4xx,
1424 .platform = "ppc405",
1425 },
1426 { /* 405EX Rev. C with Security */
1427 .pvr_mask = 0xffff000f,
1428 .pvr_value = 0x1291000f,
1429 .cpu_name = "405EX Rev. C",
1430 .cpu_features = CPU_FTRS_40X,
1431 .cpu_user_features = PPC_FEATURE_32 |
1432 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1433 .mmu_features = MMU_FTR_TYPE_40x,
1434 .icache_bsize = 32,
1435 .dcache_bsize = 32,
1436 .machine_check = machine_check_4xx,
1437 .platform = "ppc405",
1438 },
1439 { /* 405EX Rev. D without Security */
1440 .pvr_mask = 0xffff000f,
1441 .pvr_value = 0x12910003,
1442 .cpu_name = "405EX Rev. D",
1443 .cpu_features = CPU_FTRS_40X,
1444 .cpu_user_features = PPC_FEATURE_32 |
1445 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1446 .mmu_features = MMU_FTR_TYPE_40x,
1447 .icache_bsize = 32,
1448 .dcache_bsize = 32,
1449 .machine_check = machine_check_4xx,
1450 .platform = "ppc405",
1451 },
1452 { /* 405EX Rev. D with Security */
1453 .pvr_mask = 0xffff000f,
1454 .pvr_value = 0x12910005,
1455 .cpu_name = "405EX Rev. D",
1456 .cpu_features = CPU_FTRS_40X,
1457 .cpu_user_features = PPC_FEATURE_32 |
1458 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1459 .mmu_features = MMU_FTR_TYPE_40x,
1460 .icache_bsize = 32,
1461 .dcache_bsize = 32,
1462 .machine_check = machine_check_4xx,
1463 .platform = "ppc405",
1464 },
1465 { /* 405EXr Rev. A/B without Security */
1466 .pvr_mask = 0xffff000f,
1467 .pvr_value = 0x12910001,
1468 .cpu_name = "405EXr Rev. A/B",
1469 .cpu_features = CPU_FTRS_40X,
1470 .cpu_user_features = PPC_FEATURE_32 |
1471 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1472 .mmu_features = MMU_FTR_TYPE_40x,
1473 .icache_bsize = 32,
1474 .dcache_bsize = 32,
1475 .machine_check = machine_check_4xx,
1476 .platform = "ppc405",
1477 },
1478 { /* 405EXr Rev. C without Security */
1479 .pvr_mask = 0xffff000f,
1480 .pvr_value = 0x12910009,
1481 .cpu_name = "405EXr Rev. C",
1482 .cpu_features = CPU_FTRS_40X,
1483 .cpu_user_features = PPC_FEATURE_32 |
1484 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1485 .mmu_features = MMU_FTR_TYPE_40x,
1486 .icache_bsize = 32,
1487 .dcache_bsize = 32,
1488 .machine_check = machine_check_4xx,
1489 .platform = "ppc405",
1490 },
1491 { /* 405EXr Rev. C with Security */
1492 .pvr_mask = 0xffff000f,
1493 .pvr_value = 0x1291000b,
1494 .cpu_name = "405EXr Rev. C",
1495 .cpu_features = CPU_FTRS_40X,
1496 .cpu_user_features = PPC_FEATURE_32 |
1497 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1498 .mmu_features = MMU_FTR_TYPE_40x,
1499 .icache_bsize = 32,
1500 .dcache_bsize = 32,
1501 .machine_check = machine_check_4xx,
1502 .platform = "ppc405",
1503 },
1504 { /* 405EXr Rev. D without Security */
1505 .pvr_mask = 0xffff000f,
b676d84e 1506 .pvr_value = 0x12910000,
ff349103
LN
1507 .cpu_name = "405EXr Rev. D",
1508 .cpu_features = CPU_FTRS_40X,
1509 .cpu_user_features = PPC_FEATURE_32 |
1510 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1511 .mmu_features = MMU_FTR_TYPE_40x,
1512 .icache_bsize = 32,
1513 .dcache_bsize = 32,
1514 .machine_check = machine_check_4xx,
1515 .platform = "ppc405",
1516 },
1517 { /* 405EXr Rev. D with Security */
1518 .pvr_mask = 0xffff000f,
1519 .pvr_value = 0x12910002,
1520 .cpu_name = "405EXr Rev. D",
b676d84e
SR
1521 .cpu_features = CPU_FTRS_40X,
1522 .cpu_user_features = PPC_FEATURE_32 |
1523 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1524 .mmu_features = MMU_FTR_TYPE_40x,
b676d84e
SR
1525 .icache_bsize = 32,
1526 .dcache_bsize = 32,
1527 .machine_check = machine_check_4xx,
1528 .platform = "ppc405",
1529 },
df8f71fa
JB
1530 {
1531 /* 405EZ */
1532 .pvr_mask = 0xffff0000,
1533 .pvr_value = 0x41510000,
1534 .cpu_name = "405EZ",
1535 .cpu_features = CPU_FTRS_40X,
1536 .cpu_user_features = PPC_FEATURE_32 |
1537 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1538 .mmu_features = MMU_FTR_TYPE_40x,
df8f71fa
JB
1539 .icache_bsize = 32,
1540 .dcache_bsize = 32,
1541 .machine_check = machine_check_4xx,
1542 .platform = "ppc405",
1543 },
d5b9ee7b
TI
1544 { /* APM8018X */
1545 .pvr_mask = 0xffff0000,
1546 .pvr_value = 0x7ff11432,
1547 .cpu_name = "APM8018X",
1548 .cpu_features = CPU_FTRS_40X,
1549 .cpu_user_features = PPC_FEATURE_32 |
1550 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1551 .mmu_features = MMU_FTR_TYPE_40x,
1552 .icache_bsize = 32,
1553 .dcache_bsize = 32,
1554 .machine_check = machine_check_4xx,
1555 .platform = "ppc405",
1556 },
76bc080e
BH
1557 { /* default match */
1558 .pvr_mask = 0x00000000,
1559 .pvr_value = 0x00000000,
1560 .cpu_name = "(generic 40x PPC)",
1561 .cpu_features = CPU_FTRS_40X,
1562 .cpu_user_features = PPC_FEATURE_32 |
1563 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
7c03d653 1564 .mmu_features = MMU_FTR_TYPE_40x,
76bc080e
BH
1565 .icache_bsize = 32,
1566 .dcache_bsize = 32,
1567 .machine_check = machine_check_4xx,
1568 .platform = "ppc405",
1569 }
1da177e4
LT
1570
1571#endif /* CONFIG_40x */
1572#ifdef CONFIG_44x
c9cf73ae
MP
1573 {
1574 .pvr_mask = 0xf0000fff,
1575 .pvr_value = 0x40000850,
d1dfc35d
VB
1576 .cpu_name = "440GR Rev. A",
1577 .cpu_features = CPU_FTRS_44X,
1578 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1579 .mmu_features = MMU_FTR_TYPE_44x,
d1dfc35d
VB
1580 .icache_bsize = 32,
1581 .dcache_bsize = 32,
47c0bd1a 1582 .machine_check = machine_check_4xx,
d1dfc35d
VB
1583 .platform = "ppc440",
1584 },
1585 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1586 .pvr_mask = 0xf0000fff,
1587 .pvr_value = 0x40000858,
c9cf73ae 1588 .cpu_name = "440EP Rev. A",
10b35d99 1589 .cpu_features = CPU_FTRS_44X,
80f15dc7 1590 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1591 .mmu_features = MMU_FTR_TYPE_44x,
c9cf73ae
MP
1592 .icache_bsize = 32,
1593 .dcache_bsize = 32,
8112753b 1594 .cpu_setup = __setup_cpu_440ep,
47c0bd1a 1595 .machine_check = machine_check_4xx,
80f15dc7 1596 .platform = "ppc440",
c9cf73ae
MP
1597 },
1598 {
1599 .pvr_mask = 0xf0000fff,
1600 .pvr_value = 0x400008d3,
d1dfc35d 1601 .cpu_name = "440GR Rev. B",
10b35d99 1602 .cpu_features = CPU_FTRS_44X,
80f15dc7 1603 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1604 .mmu_features = MMU_FTR_TYPE_44x,
c9cf73ae
MP
1605 .icache_bsize = 32,
1606 .dcache_bsize = 32,
47c0bd1a 1607 .machine_check = machine_check_4xx,
80f15dc7 1608 .platform = "ppc440",
c9cf73ae 1609 },
3f8fc3e0
SM
1610 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1611 .pvr_mask = 0xf0000ff7,
1612 .pvr_value = 0x400008d4,
1613 .cpu_name = "440EP Rev. C",
1614 .cpu_features = CPU_FTRS_44X,
1615 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1616 .mmu_features = MMU_FTR_TYPE_44x,
3f8fc3e0
SM
1617 .icache_bsize = 32,
1618 .dcache_bsize = 32,
1619 .cpu_setup = __setup_cpu_440ep,
1620 .machine_check = machine_check_4xx,
1621 .platform = "ppc440",
1622 },
d1dfc35d
VB
1623 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1624 .pvr_mask = 0xf0000fff,
1625 .pvr_value = 0x400008db,
1626 .cpu_name = "440EP Rev. B",
15fc993e
VB
1627 .cpu_features = CPU_FTRS_44X,
1628 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1629 .mmu_features = MMU_FTR_TYPE_44x,
15fc993e
VB
1630 .icache_bsize = 32,
1631 .dcache_bsize = 32,
d1dfc35d 1632 .cpu_setup = __setup_cpu_440ep,
47c0bd1a 1633 .machine_check = machine_check_4xx,
8112753b 1634 .platform = "ppc440",
15fc993e
VB
1635 },
1636 { /* 440GRX */
1637 .pvr_mask = 0xf0000ffb,
d1dfc35d 1638 .pvr_value = 0x200008D0,
15fc993e
VB
1639 .cpu_name = "440GRX",
1640 .cpu_features = CPU_FTRS_44X,
1641 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1642 .mmu_features = MMU_FTR_TYPE_44x,
15fc993e
VB
1643 .icache_bsize = 32,
1644 .dcache_bsize = 32,
340ffd26 1645 .cpu_setup = __setup_cpu_440grx,
b2be3b15 1646 .machine_check = machine_check_440A,
340ffd26 1647 .platform = "ppc440",
15fc993e 1648 },
d1dfc35d
VB
1649 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1650 .pvr_mask = 0xf0000ffb,
1651 .pvr_value = 0x200008D8,
1652 .cpu_name = "440EPX",
1653 .cpu_features = CPU_FTRS_44X,
1654 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1655 .mmu_features = MMU_FTR_TYPE_44x,
d1dfc35d
VB
1656 .icache_bsize = 32,
1657 .dcache_bsize = 32,
1658 .cpu_setup = __setup_cpu_440epx,
47c0bd1a 1659 .machine_check = machine_check_440A,
d1dfc35d
VB
1660 .platform = "ppc440",
1661 },
4920960f 1662 { /* 440GP Rev. B */
1da177e4
LT
1663 .pvr_mask = 0xf0000fff,
1664 .pvr_value = 0x40000440,
1665 .cpu_name = "440GP Rev. B",
10b35d99 1666 .cpu_features = CPU_FTRS_44X,
80f15dc7 1667 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1668 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1669 .icache_bsize = 32,
1670 .dcache_bsize = 32,
47c0bd1a 1671 .machine_check = machine_check_4xx,
80f15dc7 1672 .platform = "ppc440gp",
1da177e4 1673 },
4920960f 1674 { /* 440GP Rev. C */
1da177e4
LT
1675 .pvr_mask = 0xf0000fff,
1676 .pvr_value = 0x40000481,
1677 .cpu_name = "440GP Rev. C",
10b35d99 1678 .cpu_features = CPU_FTRS_44X,
80f15dc7 1679 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1680 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1681 .icache_bsize = 32,
1682 .dcache_bsize = 32,
47c0bd1a 1683 .machine_check = machine_check_4xx,
80f15dc7 1684 .platform = "ppc440gp",
1da177e4
LT
1685 },
1686 { /* 440GX Rev. A */
1687 .pvr_mask = 0xf0000fff,
1688 .pvr_value = 0x50000850,
1689 .cpu_name = "440GX Rev. A",
10b35d99 1690 .cpu_features = CPU_FTRS_44X,
80f15dc7 1691 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1692 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1693 .icache_bsize = 32,
1694 .dcache_bsize = 32,
47c0bd1a
BH
1695 .cpu_setup = __setup_cpu_440gx,
1696 .machine_check = machine_check_440A,
80f15dc7 1697 .platform = "ppc440",
1da177e4
LT
1698 },
1699 { /* 440GX Rev. B */
1700 .pvr_mask = 0xf0000fff,
1701 .pvr_value = 0x50000851,
1702 .cpu_name = "440GX Rev. B",
10b35d99 1703 .cpu_features = CPU_FTRS_44X,
80f15dc7 1704 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1705 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1706 .icache_bsize = 32,
1707 .dcache_bsize = 32,
47c0bd1a
BH
1708 .cpu_setup = __setup_cpu_440gx,
1709 .machine_check = machine_check_440A,
80f15dc7 1710 .platform = "ppc440",
1da177e4
LT
1711 },
1712 { /* 440GX Rev. C */
1713 .pvr_mask = 0xf0000fff,
1714 .pvr_value = 0x50000892,
1715 .cpu_name = "440GX Rev. C",
10b35d99 1716 .cpu_features = CPU_FTRS_44X,
80f15dc7 1717 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1718 .mmu_features = MMU_FTR_TYPE_44x,
1da177e4
LT
1719 .icache_bsize = 32,
1720 .dcache_bsize = 32,
47c0bd1a
BH
1721 .cpu_setup = __setup_cpu_440gx,
1722 .machine_check = machine_check_440A,
80f15dc7 1723 .platform = "ppc440",
1da177e4 1724 },
9149fb3b
ES
1725 { /* 440GX Rev. F */
1726 .pvr_mask = 0xf0000fff,
1727 .pvr_value = 0x50000894,
1728 .cpu_name = "440GX Rev. F",
10b35d99 1729 .cpu_features = CPU_FTRS_44X,
80f15dc7 1730 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1731 .mmu_features = MMU_FTR_TYPE_44x,
9149fb3b
ES
1732 .icache_bsize = 32,
1733 .dcache_bsize = 32,
47c0bd1a
BH
1734 .cpu_setup = __setup_cpu_440gx,
1735 .machine_check = machine_check_440A,
80f15dc7 1736 .platform = "ppc440",
9149fb3b 1737 },
656de7e4 1738 { /* 440SP Rev. A */
333e6154
RD
1739 .pvr_mask = 0xfff00fff,
1740 .pvr_value = 0x53200891,
656de7e4 1741 .cpu_name = "440SP Rev. A",
10b35d99 1742 .cpu_features = CPU_FTRS_44X,
80f15dc7 1743 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1744 .mmu_features = MMU_FTR_TYPE_44x,
656de7e4
MP
1745 .icache_bsize = 32,
1746 .dcache_bsize = 32,
47c0bd1a 1747 .machine_check = machine_check_4xx,
80f15dc7 1748 .platform = "ppc440",
656de7e4 1749 },
b0f7b8bc 1750 { /* 440SPe Rev. A */
333e6154
RD
1751 .pvr_mask = 0xfff00fff,
1752 .pvr_value = 0x53400890,
1753 .cpu_name = "440SPe Rev. A",
1754 .cpu_features = CPU_FTRS_44X,
1755 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1756 .mmu_features = MMU_FTR_TYPE_44x,
333e6154
RD
1757 .icache_bsize = 32,
1758 .dcache_bsize = 32,
47c0bd1a
BH
1759 .cpu_setup = __setup_cpu_440spe,
1760 .machine_check = machine_check_440A,
333e6154
RD
1761 .platform = "ppc440",
1762 },
1763 { /* 440SPe Rev. B */
1764 .pvr_mask = 0xfff00fff,
1765 .pvr_value = 0x53400891,
1766 .cpu_name = "440SPe Rev. B",
a147c585 1767 .cpu_features = CPU_FTRS_44X,
80f15dc7 1768 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1769 .mmu_features = MMU_FTR_TYPE_44x,
b0f7b8bc
RD
1770 .icache_bsize = 32,
1771 .dcache_bsize = 32,
47c0bd1a
BH
1772 .cpu_setup = __setup_cpu_440spe,
1773 .machine_check = machine_check_440A,
80f15dc7 1774 .platform = "ppc440",
b0f7b8bc 1775 },
23e7237e
JL
1776 { /* 440 in Xilinx Virtex-5 FXT */
1777 .pvr_mask = 0xfffffff0,
1778 .pvr_value = 0x7ff21910,
1779 .cpu_name = "440 in Virtex-5 FXT",
1780 .cpu_features = CPU_FTRS_44X,
1781 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1782 .mmu_features = MMU_FTR_TYPE_44x,
23e7237e
JL
1783 .icache_bsize = 32,
1784 .dcache_bsize = 32,
640d17d6
GL
1785 .cpu_setup = __setup_cpu_440x5,
1786 .machine_check = machine_check_440A,
23e7237e
JL
1787 .platform = "ppc440",
1788 },
464076a4 1789 { /* 460EX */
20d70345 1790 .pvr_mask = 0xffff0006,
464076a4
SR
1791 .pvr_value = 0x13020002,
1792 .cpu_name = "460EX",
6d2170be 1793 .cpu_features = CPU_FTRS_440x6,
464076a4 1794 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1795 .mmu_features = MMU_FTR_TYPE_44x,
464076a4
SR
1796 .icache_bsize = 32,
1797 .dcache_bsize = 32,
1798 .cpu_setup = __setup_cpu_460ex,
1799 .machine_check = machine_check_440A,
1800 .platform = "ppc440",
1801 },
20d70345
SR
1802 { /* 460EX Rev B */
1803 .pvr_mask = 0xffff0007,
1804 .pvr_value = 0x13020004,
1805 .cpu_name = "460EX Rev. B",
1806 .cpu_features = CPU_FTRS_440x6,
1807 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1808 .mmu_features = MMU_FTR_TYPE_44x,
1809 .icache_bsize = 32,
1810 .dcache_bsize = 32,
1811 .cpu_setup = __setup_cpu_460ex,
1812 .machine_check = machine_check_440A,
1813 .platform = "ppc440",
1814 },
464076a4 1815 { /* 460GT */
20d70345 1816 .pvr_mask = 0xffff0006,
464076a4
SR
1817 .pvr_value = 0x13020000,
1818 .cpu_name = "460GT",
6d2170be 1819 .cpu_features = CPU_FTRS_440x6,
939e622c 1820 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
7c03d653 1821 .mmu_features = MMU_FTR_TYPE_44x,
464076a4
SR
1822 .icache_bsize = 32,
1823 .dcache_bsize = 32,
939e622c 1824 .cpu_setup = __setup_cpu_460gt,
464076a4
SR
1825 .machine_check = machine_check_440A,
1826 .platform = "ppc440",
1827 },
20d70345
SR
1828 { /* 460GT Rev B */
1829 .pvr_mask = 0xffff0007,
1830 .pvr_value = 0x13020005,
1831 .cpu_name = "460GT Rev. B",
1832 .cpu_features = CPU_FTRS_440x6,
1833 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1834 .mmu_features = MMU_FTR_TYPE_44x,
1835 .icache_bsize = 32,
1836 .dcache_bsize = 32,
1837 .cpu_setup = __setup_cpu_460gt,
1838 .machine_check = machine_check_440A,
1839 .platform = "ppc440",
1840 },
6c712090
MM
1841 { /* 460SX */
1842 .pvr_mask = 0xffffff00,
1843 .pvr_value = 0x13541800,
1844 .cpu_name = "460SX",
1845 .cpu_features = CPU_FTRS_44X,
1846 .cpu_user_features = COMMON_USER_BOOKE,
1847 .mmu_features = MMU_FTR_TYPE_44x,
1848 .icache_bsize = 32,
1849 .dcache_bsize = 32,
1850 .cpu_setup = __setup_cpu_460sx,
1851 .machine_check = machine_check_440A,
1852 .platform = "ppc440",
1853 },
6edc323d 1854 { /* 464 in APM821xx */
7c801160 1855 .pvr_mask = 0xfffffff0,
6edc323d
TM
1856 .pvr_value = 0x12C41C80,
1857 .cpu_name = "APM821XX",
1858 .cpu_features = CPU_FTRS_44X,
1859 .cpu_user_features = COMMON_USER_BOOKE |
1860 PPC_FEATURE_HAS_FPU,
1861 .mmu_features = MMU_FTR_TYPE_44x,
1862 .icache_bsize = 32,
1863 .dcache_bsize = 32,
1864 .cpu_setup = __setup_cpu_apm821xx,
1865 .machine_check = machine_check_440A,
1866 .platform = "ppc440",
1867 },
c48d0dba
DK
1868 { /* 476 DD2 core */
1869 .pvr_mask = 0xffffffff,
1870 .pvr_value = 0x11a52080,
e7f75ad0 1871 .cpu_name = "476",
c48d0dba 1872 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
e7f75ad0 1873 .cpu_user_features = COMMON_USER_BOOKE |
df777bd3
TB
1874 PPC_FEATURE_HAS_FPU,
1875 .mmu_features = MMU_FTR_TYPE_47x |
1876 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1877 .icache_bsize = 32,
1878 .dcache_bsize = 128,
1879 .machine_check = machine_check_47x,
1880 .platform = "ppc470",
1881 },
1882 { /* 476fpe */
1883 .pvr_mask = 0xffff0000,
1884 .pvr_value = 0x7ff50000,
1885 .cpu_name = "476fpe",
1886 .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
1887 .cpu_user_features = COMMON_USER_BOOKE |
e7f75ad0
DK
1888 PPC_FEATURE_HAS_FPU,
1889 .mmu_features = MMU_FTR_TYPE_47x |
1890 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
b4e8c8dd
TS
1891 .icache_bsize = 32,
1892 .dcache_bsize = 128,
1893 .machine_check = machine_check_47x,
1894 .platform = "ppc470",
1895 },
1896 { /* 476 iss */
1897 .pvr_mask = 0xffff0000,
1898 .pvr_value = 0x00050000,
1899 .cpu_name = "476",
1900 .cpu_features = CPU_FTRS_47X,
1901 .cpu_user_features = COMMON_USER_BOOKE |
1902 PPC_FEATURE_HAS_FPU,
b4e8c8dd
TS
1903 .mmu_features = MMU_FTR_TYPE_47x |
1904 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
e7f75ad0
DK
1905 .icache_bsize = 32,
1906 .dcache_bsize = 128,
fc5e7097 1907 .machine_check = machine_check_47x,
e7f75ad0
DK
1908 .platform = "ppc470",
1909 },
c48d0dba
DK
1910 { /* 476 others */
1911 .pvr_mask = 0xffff0000,
1912 .pvr_value = 0x11a50000,
1913 .cpu_name = "476",
1914 .cpu_features = CPU_FTRS_47X,
1915 .cpu_user_features = COMMON_USER_BOOKE |
1916 PPC_FEATURE_HAS_FPU,
1917 .mmu_features = MMU_FTR_TYPE_47x |
1918 MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
1919 .icache_bsize = 32,
1920 .dcache_bsize = 128,
1921 .machine_check = machine_check_47x,
1922 .platform = "ppc470",
1923 },
76bc080e
BH
1924 { /* default match */
1925 .pvr_mask = 0x00000000,
1926 .pvr_value = 0x00000000,
1927 .cpu_name = "(generic 44x PPC)",
1928 .cpu_features = CPU_FTRS_44X,
1929 .cpu_user_features = COMMON_USER_BOOKE,
7c03d653 1930 .mmu_features = MMU_FTR_TYPE_44x,
76bc080e
BH
1931 .icache_bsize = 32,
1932 .dcache_bsize = 32,
1933 .machine_check = machine_check_4xx,
1934 .platform = "ppc440",
1935 }
1da177e4 1936#endif /* CONFIG_44x */
e3e414bc 1937#ifdef CONFIG_E200
4920960f 1938 { /* e200z5 */
33d9e9b5
KG
1939 .pvr_mask = 0xfff00000,
1940 .pvr_value = 0x81000000,
1941 .cpu_name = "e200z5",
1942 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
10b35d99 1943 .cpu_features = CPU_FTRS_E200,
80f15dc7
PM
1944 .cpu_user_features = COMMON_USER_BOOKE |
1945 PPC_FEATURE_HAS_EFP_SINGLE |
33d9e9b5 1946 PPC_FEATURE_UNIFIED_CACHE,
7c03d653 1947 .mmu_features = MMU_FTR_TYPE_FSL_E,
33d9e9b5 1948 .dcache_bsize = 32,
47c0bd1a 1949 .machine_check = machine_check_e200,
80f15dc7 1950 .platform = "ppc5554",
33d9e9b5 1951 },
4920960f 1952 { /* e200z6 */
33d9e9b5
KG
1953 .pvr_mask = 0xfff00000,
1954 .pvr_value = 0x81100000,
1955 .cpu_name = "e200z6",
1956 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
10b35d99 1957 .cpu_features = CPU_FTRS_E200,
80f15dc7 1958 .cpu_user_features = COMMON_USER_BOOKE |
5e14d21e
KG
1959 PPC_FEATURE_HAS_SPE_COMP |
1960 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
33d9e9b5 1961 PPC_FEATURE_UNIFIED_CACHE,
7c03d653 1962 .mmu_features = MMU_FTR_TYPE_FSL_E,
33d9e9b5 1963 .dcache_bsize = 32,
47c0bd1a 1964 .machine_check = machine_check_e200,
80f15dc7 1965 .platform = "ppc5554",
33d9e9b5 1966 },
76bc080e
BH
1967 { /* default match */
1968 .pvr_mask = 0x00000000,
1969 .pvr_value = 0x00000000,
1970 .cpu_name = "(generic E200 PPC)",
1971 .cpu_features = CPU_FTRS_E200,
1972 .cpu_user_features = COMMON_USER_BOOKE |
1973 PPC_FEATURE_HAS_EFP_SINGLE |
1974 PPC_FEATURE_UNIFIED_CACHE,
7c03d653 1975 .mmu_features = MMU_FTR_TYPE_FSL_E,
76bc080e 1976 .dcache_bsize = 32,
105c31df 1977 .cpu_setup = __setup_cpu_e200,
76bc080e
BH
1978 .machine_check = machine_check_e200,
1979 .platform = "ppc5554",
516c8be3 1980 }
76bc080e 1981#endif /* CONFIG_E200 */
4490c06b 1982#endif /* CONFIG_PPC32 */
76bc080e 1983#ifdef CONFIG_E500
4490c06b 1984#ifdef CONFIG_PPC32
3477e71d 1985#ifndef CONFIG_PPC_E500MC
4920960f 1986 { /* e500 */
1da177e4
LT
1987 .pvr_mask = 0xffff0000,
1988 .pvr_value = 0x80200000,
1989 .cpu_name = "e500",
10b35d99 1990 .cpu_features = CPU_FTRS_E500,
80f15dc7 1991 .cpu_user_features = COMMON_USER_BOOKE |
5e14d21e
KG
1992 PPC_FEATURE_HAS_SPE_COMP |
1993 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
6c1bf482 1994 .cpu_user_features2 = PPC_FEATURE2_ISEL,
7c03d653 1995 .mmu_features = MMU_FTR_TYPE_FSL_E,
1da177e4
LT
1996 .icache_bsize = 32,
1997 .dcache_bsize = 32,
1998 .num_pmcs = 4,
555d97ac 1999 .oprofile_cpu_type = "ppc/e500",
39aef685 2000 .oprofile_type = PPC_OPROFILE_FSL_EMB,
105c31df 2001 .cpu_setup = __setup_cpu_e500v1,
47c0bd1a 2002 .machine_check = machine_check_e500,
80f15dc7 2003 .platform = "ppc8540",
1da177e4 2004 },
4920960f 2005 { /* e500v2 */
5b37b700
KG
2006 .pvr_mask = 0xffff0000,
2007 .pvr_value = 0x80210000,
2008 .cpu_name = "e500v2",
10b35d99 2009 .cpu_features = CPU_FTRS_E500_2,
80f15dc7 2010 .cpu_user_features = COMMON_USER_BOOKE |
5e14d21e
KG
2011 PPC_FEATURE_HAS_SPE_COMP |
2012 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
2013 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
6c1bf482 2014 .cpu_user_features2 = PPC_FEATURE2_ISEL,
7c03d653 2015 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
5b37b700
KG
2016 .icache_bsize = 32,
2017 .dcache_bsize = 32,
2018 .num_pmcs = 4,
555d97ac 2019 .oprofile_cpu_type = "ppc/e500",
39aef685 2020 .oprofile_type = PPC_OPROFILE_FSL_EMB,
105c31df 2021 .cpu_setup = __setup_cpu_e500v2,
47c0bd1a 2022 .machine_check = machine_check_e500,
80f15dc7 2023 .platform = "ppc8548",
5b37b700 2024 },
3477e71d 2025#else
3dfa8773
KG
2026 { /* e500mc */
2027 .pvr_mask = 0xffff0000,
2028 .pvr_value = 0x80230000,
2029 .cpu_name = "e500mc",
3dfa8773
KG
2030 .cpu_features = CPU_FTRS_E500MC,
2031 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
6c1bf482 2032 .cpu_user_features2 = PPC_FEATURE2_ISEL,
c3071951 2033 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
323d23ae 2034 MMU_FTR_USE_TLBILX,
3dfa8773
KG
2035 .icache_bsize = 64,
2036 .dcache_bsize = 64,
2037 .num_pmcs = 4,
a1110654 2038 .oprofile_cpu_type = "ppc/e500mc",
3dfa8773 2039 .oprofile_type = PPC_OPROFILE_FSL_EMB,
105c31df 2040 .cpu_setup = __setup_cpu_e500mc,
fe04b112 2041 .machine_check = machine_check_e500mc,
3dfa8773
KG
2042 .platform = "ppce500mc",
2043 },
3477e71d 2044#endif /* CONFIG_PPC_E500MC */
4490c06b 2045#endif /* CONFIG_PPC32 */
3477e71d 2046#ifdef CONFIG_PPC_E500MC
4490c06b
KG
2047 { /* e5500 */
2048 .pvr_mask = 0xffff0000,
2049 .pvr_value = 0x80240000,
2050 .cpu_name = "e5500",
11ed0db9 2051 .cpu_features = CPU_FTRS_E5500,
fb9be234 2052 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
6c1bf482 2053 .cpu_user_features2 = PPC_FEATURE2_ISEL,
4490c06b
KG
2054 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2055 MMU_FTR_USE_TLBILX,
2056 .icache_bsize = 64,
2057 .dcache_bsize = 64,
2058 .num_pmcs = 4,
2059 .oprofile_cpu_type = "ppc/e500mc",
2060 .oprofile_type = PPC_OPROFILE_FSL_EMB,
2061 .cpu_setup = __setup_cpu_e5500,
2c71b0cc 2062#ifndef CONFIG_PPC32
4490c06b 2063 .cpu_restore = __restore_cpu_e5500,
2c71b0cc 2064#endif
4490c06b
KG
2065 .machine_check = machine_check_e500mc,
2066 .platform = "ppce5500",
2067 },
10241842
KG
2068 { /* e6500 */
2069 .pvr_mask = 0xffff0000,
2070 .pvr_value = 0x80400000,
2071 .cpu_name = "e6500",
2072 .cpu_features = CPU_FTRS_E6500,
cd66cc2e
KG
2073 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
2074 PPC_FEATURE_HAS_ALTIVEC_COMP,
6c1bf482 2075 .cpu_user_features2 = PPC_FEATURE2_ISEL,
10241842
KG
2076 .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
2077 MMU_FTR_USE_TLBILX,
2078 .icache_bsize = 64,
2079 .dcache_bsize = 64,
5815c434 2080 .num_pmcs = 6,
10241842
KG
2081 .oprofile_cpu_type = "ppc/e6500",
2082 .oprofile_type = PPC_OPROFILE_FSL_EMB,
cd66cc2e 2083 .cpu_setup = __setup_cpu_e6500,
2c71b0cc 2084#ifndef CONFIG_PPC32
cd66cc2e 2085 .cpu_restore = __restore_cpu_e6500,
2c71b0cc 2086#endif
10241842
KG
2087 .machine_check = machine_check_e500mc,
2088 .platform = "ppce6500",
2089 },
3477e71d 2090#endif /* CONFIG_PPC_E500MC */
4490c06b 2091#ifdef CONFIG_PPC32
1da177e4
LT
2092 { /* default match */
2093 .pvr_mask = 0x00000000,
2094 .pvr_value = 0x00000000,
76bc080e
BH
2095 .cpu_name = "(generic E500 PPC)",
2096 .cpu_features = CPU_FTRS_E500,
2097 .cpu_user_features = COMMON_USER_BOOKE |
2098 PPC_FEATURE_HAS_SPE_COMP |
2099 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
7c03d653 2100 .mmu_features = MMU_FTR_TYPE_FSL_E,
1da177e4
LT
2101 .icache_bsize = 32,
2102 .dcache_bsize = 32,
76bc080e 2103 .machine_check = machine_check_e500,
80f15dc7 2104 .platform = "powerpc",
516c8be3 2105 }
4920960f 2106#endif /* CONFIG_PPC32 */
4490c06b 2107#endif /* CONFIG_E500 */
1da177e4 2108};
42c4aaad 2109
87a72f9e
PM
2110static struct cpu_spec the_cpu_spec;
2111
26ee9767
SW
2112static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
2113 struct cpu_spec *s)
42c4aaad 2114{
87a72f9e 2115 struct cpu_spec *t = &the_cpu_spec;
2657dd4e
ME
2116 struct cpu_spec old;
2117
87a72f9e 2118 t = PTRRELOC(t);
2657dd4e
ME
2119 old = *t;
2120
2121 /* Copy everything, then do fixups */
2122 *t = *s;
42c4aaad 2123
666435bb
ME
2124 /*
2125 * If we are overriding a previous value derived from the real
2126 * PVR with a new value obtained using a logical PVR value,
2127 * don't modify the performance monitor fields.
2128 */
2657dd4e
ME
2129 if (old.num_pmcs && !s->num_pmcs) {
2130 t->num_pmcs = old.num_pmcs;
2131 t->pmc_type = old.pmc_type;
2132 t->oprofile_type = old.oprofile_type;
2133 t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
2134 t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
2135 t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
2136
666435bb
ME
2137 /*
2138 * If we have passed through this logic once before and
2139 * have pulled the default case because the real PVR was
2140 * not found inside cpu_specs[], then we are possibly
2141 * running in compatibility mode. In that case, let the
2142 * oprofiler know which set of compatibility counters to
2143 * pull from by making sure the oprofile_cpu_type string
2144 * is set to that of compatibility mode. If the
2145 * oprofile_cpu_type already has a value, then we are
2146 * possibly overriding a real PVR with a logical one,
2147 * and, in that case, keep the current value for
2148 * oprofile_cpu_type.
2149 */
b173f03d 2150 if (old.oprofile_cpu_type != NULL) {
0203d6ec
BH
2151 t->oprofile_cpu_type = old.oprofile_cpu_type;
2152 t->oprofile_type = old.oprofile_type;
79af6c49 2153 }
2657dd4e 2154 }
666435bb
ME
2155
2156 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
9115d134 2157
666435bb
ME
2158 /*
2159 * Set the base platform string once; assumes
2160 * we're called with real pvr first.
2161 */
2162 if (*PTRRELOC(&powerpc_base_platform) == NULL)
2163 *PTRRELOC(&powerpc_base_platform) = t->platform;
9115d134 2164
84e3ad5b 2165#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
666435bb
ME
2166 /* ppc64 and booke expect identify_cpu to also call setup_cpu for
2167 * that processor. I will consolidate that at a later time, for now,
2168 * just use #ifdef. We also don't need to PTRRELOC the function
2169 * pointer on ppc64 and booke as we are running at 0 in real mode
2170 * on ppc64 and reloc_offset is always 0 on booke.
2171 */
af9eef3c
BH
2172 if (t->cpu_setup) {
2173 t->cpu_setup(offset, t);
666435bb 2174 }
84e3ad5b 2175#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
26ee9767
SW
2176
2177 return t;
666435bb
ME
2178}
2179
2180struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
2181{
2182 struct cpu_spec *s = cpu_specs;
2183 int i;
2184
2185 s = PTRRELOC(s);
2186
2187 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
26ee9767
SW
2188 if ((pvr & s->pvr_mask) == s->pvr_value)
2189 return setup_cpu_spec(offset, s);
666435bb
ME
2190 }
2191
42c4aaad 2192 BUG();
666435bb 2193
42c4aaad
BH
2194 return NULL;
2195}
This page took 0.793846 seconds and 5 git commands to generate.