blob: 2a8f5cc5184f0c02641b7ba78aad7ba3c95367c4 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3 *
Stephen Rothwell49209602005-10-12 15:55:09 +10004 * Modifications for ppc64:
5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * 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
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/string.h>
14#include <linux/sched.h>
15#include <linux/threads.h>
16#include <linux/init.h>
Kumar Gala400d2212005-09-27 15:13:12 -050017#include <linux/module.h>
18
19#include <asm/oprofile_impl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include <asm/cputable.h>
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100021#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Kumar Gala400d2212005-09-27 15:13:12 -050023struct cpu_spec* cur_cpu_spec = NULL;
Stephen Rothwell49209602005-10-12 15:55:09 +100024EXPORT_SYMBOL(cur_cpu_spec);
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Stephen Rothwell49209602005-10-12 15:55:09 +100026/* NOTE:
27 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
28 * the responsibility of the appropriate CPU save/restore functions to
29 * eventually copy these settings over. Those save/restore aren't yet
30 * part of the cputable though. That has to be fixed for both ppc32
31 * and ppc64
32 */
Geoff Levandb26f1002006-05-19 14:24:18 +100033#ifdef CONFIG_PPC32
Valentine Barshak81127532007-09-22 00:46:57 +100034extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110036extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
Valentine Barshak340ffd22007-09-22 00:50:09 +100037extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110038extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
Kumar Gala400d2212005-09-27 15:13:12 -050039extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
42extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
43extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
44extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100047#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050048#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050049extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050050extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060051extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110052extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050053extern void __restore_cpu_ppc970(void);
54#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
Linus Torvalds1da177e2005-04-16 15:20:36 -070056/* This table only contains "desktop" CPUs, it need to be filled with embedded
57 * ones as well...
58 */
Stephen Rothwell49209602005-10-12 15:55:09 +100059#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
60 PPC_FEATURE_HAS_MMU)
61#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110062#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110063#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
64 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
65#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
66 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100067#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100068 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
69 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050070#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
71 PPC_FEATURE_TRUE_LE | \
72 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110073#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
74 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070075
Paul Mackerras87a72f92007-10-04 14:18:01 +100076static struct cpu_spec __initdata cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100077#ifdef CONFIG_PPC64
78 { /* Power3 */
79 .pvr_mask = 0xffff0000,
80 .pvr_value = 0x00400000,
81 .cpu_name = "POWER3 (630)",
82 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100083 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100084 .icache_bsize = 128,
85 .dcache_bsize = 128,
86 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060087 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100088 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000089 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +110090 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110091 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100092 },
93 { /* Power3+ */
94 .pvr_mask = 0xffff0000,
95 .pvr_value = 0x00410000,
96 .cpu_name = "POWER3 (630+)",
97 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100098 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100099 .icache_bsize = 128,
100 .dcache_bsize = 128,
101 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600102 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000103 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000104 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100105 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100106 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000107 },
108 { /* Northstar */
109 .pvr_mask = 0xffff0000,
110 .pvr_value = 0x00330000,
111 .cpu_name = "RS64-II (northstar)",
112 .cpu_features = CPU_FTRS_RS64,
113 .cpu_user_features = COMMON_USER_PPC64,
114 .icache_bsize = 128,
115 .dcache_bsize = 128,
116 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600117 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000118 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000119 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100120 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100121 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000122 },
123 { /* Pulsar */
124 .pvr_mask = 0xffff0000,
125 .pvr_value = 0x00340000,
126 .cpu_name = "RS64-III (pulsar)",
127 .cpu_features = CPU_FTRS_RS64,
128 .cpu_user_features = COMMON_USER_PPC64,
129 .icache_bsize = 128,
130 .dcache_bsize = 128,
131 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600132 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000133 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000134 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100135 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100136 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000137 },
138 { /* I-star */
139 .pvr_mask = 0xffff0000,
140 .pvr_value = 0x00360000,
141 .cpu_name = "RS64-III (icestar)",
142 .cpu_features = CPU_FTRS_RS64,
143 .cpu_user_features = COMMON_USER_PPC64,
144 .icache_bsize = 128,
145 .dcache_bsize = 128,
146 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600147 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000148 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000149 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100150 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100151 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000152 },
153 { /* S-star */
154 .pvr_mask = 0xffff0000,
155 .pvr_value = 0x00370000,
156 .cpu_name = "RS64-IV (sstar)",
157 .cpu_features = CPU_FTRS_RS64,
158 .cpu_user_features = COMMON_USER_PPC64,
159 .icache_bsize = 128,
160 .dcache_bsize = 128,
161 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600162 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000163 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000164 .oprofile_type = PPC_OPROFILE_RS64,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100165 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100166 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000167 },
168 { /* Power4 */
169 .pvr_mask = 0xffff0000,
170 .pvr_value = 0x00350000,
171 .cpu_name = "POWER4 (gp)",
172 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100173 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000174 .icache_bsize = 128,
175 .dcache_bsize = 128,
176 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600177 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000178 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000179 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100180 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100181 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000182 },
183 { /* Power4+ */
184 .pvr_mask = 0xffff0000,
185 .pvr_value = 0x00380000,
186 .cpu_name = "POWER4+ (gq)",
187 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100188 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000189 .icache_bsize = 128,
190 .dcache_bsize = 128,
191 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600192 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000193 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000194 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100195 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100196 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000197 },
198 { /* PPC970 */
199 .pvr_mask = 0xffff0000,
200 .pvr_value = 0x00390000,
201 .cpu_name = "PPC970",
202 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100203 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000204 PPC_FEATURE_HAS_ALTIVEC_COMP,
205 .icache_bsize = 128,
206 .dcache_bsize = 128,
207 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600208 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000209 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500210 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000211 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000212 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100213 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100214 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000216 { /* PPC970FX */
217 .pvr_mask = 0xffff0000,
218 .pvr_value = 0x003c0000,
219 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000220 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100221 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 PPC_FEATURE_HAS_ALTIVEC_COMP,
223 .icache_bsize = 128,
224 .dcache_bsize = 128,
225 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600226 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500228 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000229 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000230 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100231 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100232 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000233 },
Olof Johansson3546e812007-02-26 00:35:14 -0600234 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
235 .pvr_mask = 0xffffffff,
236 .pvr_value = 0x00440100,
237 .cpu_name = "PPC970MP",
238 .cpu_features = CPU_FTRS_PPC970,
239 .cpu_user_features = COMMON_USER_POWER4 |
240 PPC_FEATURE_HAS_ALTIVEC_COMP,
241 .icache_bsize = 128,
242 .dcache_bsize = 128,
243 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000244 .pmc_type = PPC_PMC_IBM,
Olof Johansson3546e812007-02-26 00:35:14 -0600245 .cpu_setup = __setup_cpu_ppc970,
246 .cpu_restore = __restore_cpu_ppc970,
247 .oprofile_cpu_type = "ppc64/970MP",
248 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100249 .machine_check = machine_check_generic,
Olof Johansson3546e812007-02-26 00:35:14 -0600250 .platform = "ppc970",
251 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000252 { /* PPC970MP */
253 .pvr_mask = 0xffff0000,
254 .pvr_value = 0x00440000,
255 .cpu_name = "PPC970MP",
256 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100257 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000258 PPC_FEATURE_HAS_ALTIVEC_COMP,
259 .icache_bsize = 128,
260 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000261 .num_pmcs = 8,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000262 .pmc_type = PPC_PMC_IBM,
Olof Johansson5b43d202006-10-04 23:41:41 -0500263 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500264 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600265 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000266 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100267 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100268 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000269 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500270 { /* PPC970GX */
271 .pvr_mask = 0xffff0000,
272 .pvr_value = 0x00450000,
273 .cpu_name = "PPC970GX",
274 .cpu_features = CPU_FTRS_PPC970,
275 .cpu_user_features = COMMON_USER_POWER4 |
276 PPC_FEATURE_HAS_ALTIVEC_COMP,
277 .icache_bsize = 128,
278 .dcache_bsize = 128,
279 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600280 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500281 .cpu_setup = __setup_cpu_ppc970,
282 .oprofile_cpu_type = "ppc64/970",
283 .oprofile_type = PPC_OPROFILE_POWER4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100284 .machine_check = machine_check_generic,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500285 .platform = "ppc970",
286 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100287 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000288 .pvr_mask = 0xffff0000,
289 .pvr_value = 0x003a0000,
290 .cpu_name = "POWER5 (gr)",
291 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100292 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000293 .icache_bsize = 128,
294 .dcache_bsize = 128,
295 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600296 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000297 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000298 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000299 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
300 * and above but only works on POWER5 and above
301 */
302 .oprofile_mmcra_sihv = MMCRA_SIHV,
303 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100304 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100305 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000306 },
Mike Wolf31a12ce2007-07-10 13:13:47 -0500307 { /* Power5++ */
308 .pvr_mask = 0xffffff00,
309 .pvr_value = 0x003b0300,
310 .cpu_name = "POWER5+ (gs)",
311 .cpu_features = CPU_FTRS_POWER5,
312 .cpu_user_features = COMMON_USER_POWER5_PLUS,
313 .icache_bsize = 128,
314 .dcache_bsize = 128,
315 .num_pmcs = 6,
316 .oprofile_cpu_type = "ppc64/power5++",
317 .oprofile_type = PPC_OPROFILE_POWER4,
318 .oprofile_mmcra_sihv = MMCRA_SIHV,
319 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100320 .machine_check = machine_check_generic,
Mike Wolf31a12ce2007-07-10 13:13:47 -0500321 .platform = "power5+",
322 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100323 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000324 .pvr_mask = 0xffff0000,
325 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100326 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000327 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100328 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000329 .icache_bsize = 128,
330 .dcache_bsize = 128,
331 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600332 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100333 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000334 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000335 .oprofile_mmcra_sihv = MMCRA_SIHV,
336 .oprofile_mmcra_sipr = MMCRA_SIPR,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100337 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100338 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000339 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100340 { /* POWER6 in P5+ mode; 2.04-compliant processor */
341 .pvr_mask = 0xffffffff,
342 .pvr_value = 0x0f000001,
343 .cpu_name = "POWER5+",
344 .cpu_features = CPU_FTRS_POWER5,
345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
346 .icache_bsize = 128,
347 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100348 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100349 .platform = "power5+",
350 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000351 { /* Power6 */
352 .pvr_mask = 0xffff0000,
353 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100354 .cpu_name = "POWER6 (raw)",
355 .cpu_features = CPU_FTRS_POWER6,
356 .cpu_user_features = COMMON_USER_POWER6 |
357 PPC_FEATURE_POWER6_EXT,
358 .icache_bsize = 128,
359 .dcache_bsize = 128,
360 .num_pmcs = 6,
Anton Blanchard2fae4982007-05-19 15:22:41 +1000361 .pmc_type = PPC_PMC_IBM,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100362 .oprofile_cpu_type = "ppc64/power6",
363 .oprofile_type = PPC_OPROFILE_POWER4,
364 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
365 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
366 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
367 POWER6_MMCRA_OTHER,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100368 .machine_check = machine_check_generic,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100369 .platform = "power6x",
370 },
371 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
372 .pvr_mask = 0xffffffff,
373 .pvr_value = 0x0f000002,
374 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000375 .cpu_features = CPU_FTRS_POWER6,
376 .cpu_user_features = COMMON_USER_POWER6,
377 .icache_bsize = 128,
378 .dcache_bsize = 128,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100379 .machine_check = machine_check_generic,
Anton Blanchard03054d52006-04-29 09:51:06 +1000380 .platform = "power6",
381 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000382 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000383 .pvr_mask = 0xffff0000,
384 .pvr_value = 0x00700000,
385 .cpu_name = "Cell Broadband Engine",
386 .cpu_features = CPU_FTRS_CELL,
387 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100388 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
389 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000390 .icache_bsize = 128,
391 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100392 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600393 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100394 .oprofile_cpu_type = "ppc64/cell-be",
395 .oprofile_type = PPC_OPROFILE_CELL,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100396 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100397 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000398 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500399 { /* PA Semi PA6T */
400 .pvr_mask = 0x7fff0000,
401 .pvr_value = 0x00900000,
402 .cpu_name = "PA6T",
403 .cpu_features = CPU_FTRS_PA6T,
404 .cpu_user_features = COMMON_USER_PA6T,
405 .icache_bsize = 64,
406 .dcache_bsize = 64,
407 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600408 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600409 .cpu_setup = __setup_cpu_pa6t,
410 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000411 .oprofile_cpu_type = "ppc64/pa6t",
412 .oprofile_type = PPC_OPROFILE_PA6T,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100413 .machine_check = machine_check_generic,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500414 .platform = "pa6t",
415 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000416 { /* default match */
417 .pvr_mask = 0x00000000,
418 .pvr_value = 0x00000000,
419 .cpu_name = "POWER4 (compatible)",
420 .cpu_features = CPU_FTRS_COMPATIBLE,
421 .cpu_user_features = COMMON_USER_PPC64,
422 .icache_bsize = 128,
423 .dcache_bsize = 128,
424 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600425 .pmc_type = PPC_PMC_IBM,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100426 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100427 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000428 }
429#endif /* CONFIG_PPC64 */
430#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000432 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433 .pvr_mask = 0xffff0000,
434 .pvr_value = 0x00010000,
435 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500436 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000437 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000438 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439 .icache_bsize = 32,
440 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100441 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100442 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700443 },
444 { /* 603 */
445 .pvr_mask = 0xffff0000,
446 .pvr_value = 0x00030000,
447 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500448 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000449 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700450 .icache_bsize = 32,
451 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100452 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100453 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100454 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700455 },
456 { /* 603e */
457 .pvr_mask = 0xffff0000,
458 .pvr_value = 0x00060000,
459 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500460 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000461 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700462 .icache_bsize = 32,
463 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100464 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100465 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100466 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700467 },
468 { /* 603ev */
469 .pvr_mask = 0xffff0000,
470 .pvr_value = 0x00070000,
471 .cpu_name = "603ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500472 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000473 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700474 .icache_bsize = 32,
475 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100476 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100477 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100478 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479 },
480 { /* 604 */
481 .pvr_mask = 0xffff0000,
482 .pvr_value = 0x00040000,
483 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500484 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000485 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700486 .icache_bsize = 32,
487 .dcache_bsize = 32,
488 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100489 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100490 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100491 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700492 },
493 { /* 604e */
494 .pvr_mask = 0xfffff000,
495 .pvr_value = 0x00090000,
496 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500497 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000498 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700499 .icache_bsize = 32,
500 .dcache_bsize = 32,
501 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100502 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100503 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100504 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700505 },
506 { /* 604r */
507 .pvr_mask = 0xffff0000,
508 .pvr_value = 0x00090000,
509 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500510 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000511 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700512 .icache_bsize = 32,
513 .dcache_bsize = 32,
514 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100515 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100516 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100517 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700518 },
519 { /* 604ev */
520 .pvr_mask = 0xffff0000,
521 .pvr_value = 0x000a0000,
522 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500523 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000524 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700525 .icache_bsize = 32,
526 .dcache_bsize = 32,
527 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100528 .cpu_setup = __setup_cpu_604,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100529 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100530 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700531 },
532 { /* 740/750 (0x4202, don't support TAU ?) */
533 .pvr_mask = 0xffffffff,
534 .pvr_value = 0x00084202,
535 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500536 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000537 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538 .icache_bsize = 32,
539 .dcache_bsize = 32,
540 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100541 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100542 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100543 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700544 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 { /* 750CX (80100 and 8010x?) */
546 .pvr_mask = 0xfffffff0,
547 .pvr_value = 0x00080100,
548 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500549 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000550 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551 .icache_bsize = 32,
552 .dcache_bsize = 32,
553 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100554 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100555 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100556 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700557 },
558 { /* 750CX (82201 and 82202) */
559 .pvr_mask = 0xfffffff0,
560 .pvr_value = 0x00082200,
561 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500562 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000563 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700564 .icache_bsize = 32,
565 .dcache_bsize = 32,
566 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100567 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100568 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100569 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570 },
571 { /* 750CXe (82214) */
572 .pvr_mask = 0xfffffff0,
573 .pvr_value = 0x00082210,
574 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500575 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000576 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700577 .icache_bsize = 32,
578 .dcache_bsize = 32,
579 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100580 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100581 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100582 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700583 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700584 { /* 750CXe "Gekko" (83214) */
585 .pvr_mask = 0xffffffff,
586 .pvr_value = 0x00083214,
587 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500588 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000589 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700590 .icache_bsize = 32,
591 .dcache_bsize = 32,
592 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100593 .cpu_setup = __setup_cpu_750cx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100594 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100595 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700596 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500597 { /* 750CL */
598 .pvr_mask = 0xfffff0f0,
599 .pvr_value = 0x00087010,
600 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000601 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500602 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
603 .icache_bsize = 32,
604 .dcache_bsize = 32,
605 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000606 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100607 .machine_check = machine_check_generic,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500608 .platform = "ppc750",
609 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700610 { /* 745/755 */
611 .pvr_mask = 0xfffff000,
612 .pvr_value = 0x00083000,
613 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500614 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000615 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700616 .icache_bsize = 32,
617 .dcache_bsize = 32,
618 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100619 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100620 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100621 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700622 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700623 { /* 750FX rev 1.x */
624 .pvr_mask = 0xffffff00,
625 .pvr_value = 0x70000100,
626 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500627 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000628 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 .icache_bsize = 32,
630 .dcache_bsize = 32,
631 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100632 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100633 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100634 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700635 },
636 { /* 750FX rev 2.0 must disable HID0[DPM] */
637 .pvr_mask = 0xffffffff,
638 .pvr_value = 0x70000200,
639 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500640 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000641 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642 .icache_bsize = 32,
643 .dcache_bsize = 32,
644 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100645 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100646 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100647 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 },
649 { /* 750FX (All revs except 2.0) */
650 .pvr_mask = 0xffff0000,
651 .pvr_value = 0x70000000,
652 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500653 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000654 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700655 .icache_bsize = 32,
656 .dcache_bsize = 32,
657 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100658 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100659 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100660 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700661 },
662 { /* 750GX */
663 .pvr_mask = 0xffff0000,
664 .pvr_value = 0x70020000,
665 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500666 .cpu_features = CPU_FTRS_750GX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000667 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700668 .icache_bsize = 32,
669 .dcache_bsize = 32,
670 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100671 .cpu_setup = __setup_cpu_750fx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100672 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100673 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700674 },
675 { /* 740/750 (L2CR bit need fixup for 740) */
676 .pvr_mask = 0xffff0000,
677 .pvr_value = 0x00080000,
678 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500679 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000680 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700681 .icache_bsize = 32,
682 .dcache_bsize = 32,
683 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100684 .cpu_setup = __setup_cpu_750,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100685 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100686 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700687 },
688 { /* 7400 rev 1.1 ? (no TAU) */
689 .pvr_mask = 0xffffffff,
690 .pvr_value = 0x000c1101,
691 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500692 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000693 .cpu_user_features = COMMON_USER |
694 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700695 .icache_bsize = 32,
696 .dcache_bsize = 32,
697 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100698 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100699 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100700 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700701 },
702 { /* 7400 */
703 .pvr_mask = 0xffff0000,
704 .pvr_value = 0x000c0000,
705 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500706 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000707 .cpu_user_features = COMMON_USER |
708 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700709 .icache_bsize = 32,
710 .dcache_bsize = 32,
711 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100712 .cpu_setup = __setup_cpu_7400,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100713 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100714 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700715 },
716 { /* 7410 */
717 .pvr_mask = 0xffff0000,
718 .pvr_value = 0x800c0000,
719 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500720 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000721 .cpu_user_features = COMMON_USER |
722 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700723 .icache_bsize = 32,
724 .dcache_bsize = 32,
725 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100726 .cpu_setup = __setup_cpu_7410,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100727 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100728 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700729 },
730 { /* 7450 2.0 - no doze/nap */
731 .pvr_mask = 0xffffffff,
732 .pvr_value = 0x80000200,
733 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500734 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000735 .cpu_user_features = COMMON_USER |
736 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737 .icache_bsize = 32,
738 .dcache_bsize = 32,
739 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600740 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600741 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000742 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100743 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100744 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700745 },
746 { /* 7450 2.1 */
747 .pvr_mask = 0xffffffff,
748 .pvr_value = 0x80000201,
749 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500750 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000751 .cpu_user_features = COMMON_USER |
752 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 .icache_bsize = 32,
754 .dcache_bsize = 32,
755 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600756 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600757 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000758 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100759 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100760 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700761 },
762 { /* 7450 2.3 and newer */
763 .pvr_mask = 0xffff0000,
764 .pvr_value = 0x80000000,
765 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500766 .cpu_features = CPU_FTRS_7450_23,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000767 .cpu_user_features = COMMON_USER |
768 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700769 .icache_bsize = 32,
770 .dcache_bsize = 32,
771 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600772 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600773 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000774 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100775 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100776 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700777 },
778 { /* 7455 rev 1.x */
779 .pvr_mask = 0xffffff00,
780 .pvr_value = 0x80010100,
781 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500782 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000783 .cpu_user_features = COMMON_USER |
784 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700785 .icache_bsize = 32,
786 .dcache_bsize = 32,
787 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600788 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600789 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000790 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100791 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100792 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793 },
794 { /* 7455 rev 2.0 */
795 .pvr_mask = 0xffffffff,
796 .pvr_value = 0x80010200,
797 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500798 .cpu_features = CPU_FTRS_7455_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000799 .cpu_user_features = COMMON_USER |
800 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700801 .icache_bsize = 32,
802 .dcache_bsize = 32,
803 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600804 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600805 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000806 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100807 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100808 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700809 },
810 { /* 7455 others */
811 .pvr_mask = 0xffff0000,
812 .pvr_value = 0x80010000,
813 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500814 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000815 .cpu_user_features = COMMON_USER |
816 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700817 .icache_bsize = 32,
818 .dcache_bsize = 32,
819 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600820 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600821 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000822 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100823 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100824 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700825 },
826 { /* 7447/7457 Rev 1.0 */
827 .pvr_mask = 0xffffffff,
828 .pvr_value = 0x80020100,
829 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500830 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000831 .cpu_user_features = COMMON_USER |
832 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700833 .icache_bsize = 32,
834 .dcache_bsize = 32,
835 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600836 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600837 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000838 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100839 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100840 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700841 },
842 { /* 7447/7457 Rev 1.1 */
843 .pvr_mask = 0xffffffff,
844 .pvr_value = 0x80020101,
845 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500846 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000847 .cpu_user_features = COMMON_USER |
848 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700849 .icache_bsize = 32,
850 .dcache_bsize = 32,
851 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600852 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600853 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000854 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100855 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100856 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700857 },
858 { /* 7447/7457 Rev 1.2 and later */
859 .pvr_mask = 0xffff0000,
860 .pvr_value = 0x80020000,
861 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500862 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000863 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700864 .icache_bsize = 32,
865 .dcache_bsize = 32,
866 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600867 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600868 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000869 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100870 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100871 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700872 },
873 { /* 7447A */
874 .pvr_mask = 0xffff0000,
875 .pvr_value = 0x80030000,
876 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500877 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000878 .cpu_user_features = COMMON_USER |
879 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700880 .icache_bsize = 32,
881 .dcache_bsize = 32,
882 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600883 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600884 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000885 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100886 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100887 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700888 },
Kumar Galabbde6302005-09-03 15:55:55 -0700889 { /* 7448 */
890 .pvr_mask = 0xffff0000,
891 .pvr_value = 0x80040000,
892 .cpu_name = "7448",
James.Yang3d372542007-05-02 16:34:43 -0500893 .cpu_features = CPU_FTRS_7448,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000894 .cpu_user_features = COMMON_USER |
895 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700896 .icache_bsize = 32,
897 .dcache_bsize = 32,
898 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600899 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600900 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000901 .oprofile_type = PPC_OPROFILE_G4,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100902 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100903 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700904 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700905 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
906 .pvr_mask = 0x7fff0000,
907 .pvr_value = 0x00810000,
908 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500909 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000910 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700911 .icache_bsize = 32,
912 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100913 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100914 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100915 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916 },
917 { /* All G2_LE (603e core, plus some) have the same pvr */
918 .pvr_mask = 0x7fff0000,
919 .pvr_value = 0x00820000,
920 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500921 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000922 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923 .icache_bsize = 32,
924 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100925 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100926 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100927 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500929 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700930 .pvr_mask = 0x7fff0000,
931 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500932 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500933 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000934 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700935 .icache_bsize = 32,
936 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100937 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100938 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100939 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500941 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
942 .pvr_mask = 0x7fff0000,
943 .pvr_value = 0x00840000,
944 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600945 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500946 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
947 .icache_bsize = 32,
948 .dcache_bsize = 32,
949 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100950 .machine_check = machine_check_generic,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500951 .platform = "ppc603",
952 },
Li Yanga58d5242007-10-19 19:38:42 +0800953 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
Scott Wood57933f82006-12-01 12:57:05 -0600954 .pvr_mask = 0x7fff0000,
955 .pvr_value = 0x00850000,
956 .cpu_name = "e300c3",
957 .cpu_features = CPU_FTRS_E300,
958 .cpu_user_features = COMMON_USER,
959 .icache_bsize = 32,
960 .dcache_bsize = 32,
961 .cpu_setup = __setup_cpu_603,
Andy Fleming1347a2c12008-02-04 18:28:07 -0600962 .num_pmcs = 4,
963 .oprofile_cpu_type = "ppc/e300",
964 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Scott Wood57933f82006-12-01 12:57:05 -0600965 .platform = "ppc603",
966 },
Li Yanga58d5242007-10-19 19:38:42 +0800967 { /* e300c4 (e300c1, plus one IU) */
968 .pvr_mask = 0x7fff0000,
969 .pvr_value = 0x00860000,
970 .cpu_name = "e300c4",
971 .cpu_features = CPU_FTRS_E300,
972 .cpu_user_features = COMMON_USER,
973 .icache_bsize = 32,
974 .dcache_bsize = 32,
975 .cpu_setup = __setup_cpu_603,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100976 .machine_check = machine_check_generic,
Andy Fleming1347a2c12008-02-04 18:28:07 -0600977 .num_pmcs = 4,
978 .oprofile_cpu_type = "ppc/e300",
979 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Li Yanga58d5242007-10-19 19:38:42 +0800980 .platform = "ppc603",
981 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700982 { /* default match, we assume split I/D cache & TB (non-601)... */
983 .pvr_mask = 0x00000000,
984 .pvr_value = 0x00000000,
985 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500986 .cpu_features = CPU_FTRS_CLASSIC32,
Stephen Rothwell49209602005-10-12 15:55:09 +1000987 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700988 .icache_bsize = 32,
989 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +1100990 .machine_check = machine_check_generic,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100991 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700992 },
993#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994#ifdef CONFIG_8xx
995 { /* 8xx */
996 .pvr_mask = 0xffff0000,
997 .pvr_value = 0x00500000,
998 .cpu_name = "8xx",
999 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1000 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -05001001 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001002 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1003 .icache_bsize = 16,
1004 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001005 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 },
1007#endif /* CONFIG_8xx */
1008#ifdef CONFIG_40x
1009 { /* 403GC */
1010 .pvr_mask = 0xffffff00,
1011 .pvr_value = 0x00200200,
1012 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -05001013 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001014 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1015 .icache_bsize = 16,
1016 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001017 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001018 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001019 },
1020 { /* 403GCX */
1021 .pvr_mask = 0xffffff00,
1022 .pvr_value = 0x00201400,
1023 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -05001024 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +10001025 .cpu_user_features = PPC_FEATURE_32 |
1026 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001027 .icache_bsize = 16,
1028 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001029 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001030 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001031 },
1032 { /* 403G ?? */
1033 .pvr_mask = 0xffff0000,
1034 .pvr_value = 0x00200000,
1035 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -05001036 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001037 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1038 .icache_bsize = 16,
1039 .dcache_bsize = 16,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001040 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001041 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001042 },
1043 { /* 405GP */
1044 .pvr_mask = 0xffff0000,
1045 .pvr_value = 0x40110000,
1046 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001047 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001048 .cpu_user_features = PPC_FEATURE_32 |
1049 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1050 .icache_bsize = 32,
1051 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001052 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001053 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001054 },
1055 { /* STB 03xxx */
1056 .pvr_mask = 0xffff0000,
1057 .pvr_value = 0x40130000,
1058 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001059 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001060 .cpu_user_features = PPC_FEATURE_32 |
1061 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1062 .icache_bsize = 32,
1063 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001064 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001065 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001066 },
1067 { /* STB 04xxx */
1068 .pvr_mask = 0xffff0000,
1069 .pvr_value = 0x41810000,
1070 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001071 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001072 .cpu_user_features = PPC_FEATURE_32 |
1073 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1074 .icache_bsize = 32,
1075 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001076 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001077 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001078 },
1079 { /* NP405L */
1080 .pvr_mask = 0xffff0000,
1081 .pvr_value = 0x41610000,
1082 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -05001083 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001084 .cpu_user_features = PPC_FEATURE_32 |
1085 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1086 .icache_bsize = 32,
1087 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001088 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001089 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001090 },
1091 { /* NP4GS3 */
1092 .pvr_mask = 0xffff0000,
1093 .pvr_value = 0x40B10000,
1094 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001095 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001096 .cpu_user_features = PPC_FEATURE_32 |
1097 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1098 .icache_bsize = 32,
1099 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001100 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001101 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001102 },
1103 { /* NP405H */
1104 .pvr_mask = 0xffff0000,
1105 .pvr_value = 0x41410000,
1106 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001107 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001108 .cpu_user_features = PPC_FEATURE_32 |
1109 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1110 .icache_bsize = 32,
1111 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001112 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001113 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001114 },
1115 { /* 405GPr */
1116 .pvr_mask = 0xffff0000,
1117 .pvr_value = 0x50910000,
1118 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001119 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001120 .cpu_user_features = PPC_FEATURE_32 |
1121 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1122 .icache_bsize = 32,
1123 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001124 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001125 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001126 },
1127 { /* STBx25xx */
1128 .pvr_mask = 0xffff0000,
1129 .pvr_value = 0x51510000,
1130 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001131 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001132 .cpu_user_features = PPC_FEATURE_32 |
1133 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1134 .icache_bsize = 32,
1135 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001136 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001137 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001138 },
1139 { /* 405LP */
1140 .pvr_mask = 0xffff0000,
1141 .pvr_value = 0x41F10000,
1142 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001143 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001144 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1145 .icache_bsize = 32,
1146 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001147 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001148 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001149 },
1150 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001151 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001152 .pvr_value = 0x20010000,
1153 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001154 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 .cpu_user_features = PPC_FEATURE_32 |
1156 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1157 .icache_bsize = 32,
1158 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001159 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001160 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001161 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001162 { /* Xilinx Virtex-4 FX */
1163 .pvr_mask = 0xfffff000,
1164 .pvr_value = 0x20011000,
1165 .cpu_name = "Virtex-4 FX",
1166 .cpu_features = CPU_FTRS_40X,
1167 .cpu_user_features = PPC_FEATURE_32 |
1168 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1169 .icache_bsize = 32,
1170 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001171 .machine_check = machine_check_4xx,
Peter Bergner838fdb42006-09-14 14:18:38 -05001172 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001173 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001174 { /* 405EP */
1175 .pvr_mask = 0xffff0000,
1176 .pvr_value = 0x51210000,
1177 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001178 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001179 .cpu_user_features = PPC_FEATURE_32 |
1180 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1181 .icache_bsize = 32,
1182 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001183 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001184 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001185 },
Stefan Roese5d8476c2007-10-11 22:08:14 +10001186 { /* 405EX */
Stefan Roeseb676d842008-01-15 18:09:15 +11001187 .pvr_mask = 0xffff0004,
1188 .pvr_value = 0x12910004,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001189 .cpu_name = "405EX",
1190 .cpu_features = CPU_FTRS_40X,
1191 .cpu_user_features = PPC_FEATURE_32 |
1192 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1193 .icache_bsize = 32,
1194 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001195 .machine_check = machine_check_4xx,
Stefan Roese5d8476c2007-10-11 22:08:14 +10001196 .platform = "ppc405",
1197 },
Stefan Roeseb676d842008-01-15 18:09:15 +11001198 { /* 405EXr */
1199 .pvr_mask = 0xffff0004,
1200 .pvr_value = 0x12910000,
1201 .cpu_name = "405EXr",
1202 .cpu_features = CPU_FTRS_40X,
1203 .cpu_user_features = PPC_FEATURE_32 |
1204 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1205 .icache_bsize = 32,
1206 .dcache_bsize = 32,
1207 .machine_check = machine_check_4xx,
1208 .platform = "ppc405",
1209 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001210
1211#endif /* CONFIG_40x */
1212#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001213 {
1214 .pvr_mask = 0xf0000fff,
1215 .pvr_value = 0x40000850,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001216 .cpu_name = "440GR Rev. A",
1217 .cpu_features = CPU_FTRS_44X,
1218 .cpu_user_features = COMMON_USER_BOOKE,
1219 .icache_bsize = 32,
1220 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001221 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001222 .platform = "ppc440",
1223 },
1224 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1225 .pvr_mask = 0xf0000fff,
1226 .pvr_value = 0x40000858,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001227 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001228 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001229 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001230 .icache_bsize = 32,
1231 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001232 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001233 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001234 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001235 },
1236 {
1237 .pvr_mask = 0xf0000fff,
1238 .pvr_value = 0x400008d3,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001239 .cpu_name = "440GR Rev. B",
1240 .cpu_features = CPU_FTRS_44X,
1241 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1242 .icache_bsize = 32,
1243 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001244 .machine_check = machine_check_4xx,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001245 .platform = "ppc440",
1246 },
Sean MacLennan3f8fc3e2008-01-10 07:25:58 +11001247 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1248 .pvr_mask = 0xf0000ff7,
1249 .pvr_value = 0x400008d4,
1250 .cpu_name = "440EP Rev. C",
1251 .cpu_features = CPU_FTRS_44X,
1252 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1253 .icache_bsize = 32,
1254 .dcache_bsize = 32,
1255 .cpu_setup = __setup_cpu_440ep,
1256 .machine_check = machine_check_4xx,
1257 .platform = "ppc440",
1258 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001259 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1260 .pvr_mask = 0xf0000fff,
1261 .pvr_value = 0x400008db,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001262 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001263 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001264 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001265 .icache_bsize = 32,
1266 .dcache_bsize = 32,
Valentine Barshak81127532007-09-22 00:46:57 +10001267 .cpu_setup = __setup_cpu_440ep,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001268 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001269 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001270 },
Valentine Barshak15fc9932007-08-29 17:40:30 +04001271 { /* 440GRX */
1272 .pvr_mask = 0xf0000ffb,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001273 .pvr_value = 0x200008D0,
Valentine Barshak15fc9932007-08-29 17:40:30 +04001274 .cpu_name = "440GRX",
1275 .cpu_features = CPU_FTRS_44X,
1276 .cpu_user_features = COMMON_USER_BOOKE,
1277 .icache_bsize = 32,
1278 .dcache_bsize = 32,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001279 .cpu_setup = __setup_cpu_440grx,
Valentine Barshakb2be3b12007-12-22 03:22:23 +11001280 .machine_check = machine_check_440A,
Valentine Barshak340ffd22007-09-22 00:50:09 +10001281 .platform = "ppc440",
Valentine Barshak15fc9932007-08-29 17:40:30 +04001282 },
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001283 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1284 .pvr_mask = 0xf0000ffb,
1285 .pvr_value = 0x200008D8,
1286 .cpu_name = "440EPX",
1287 .cpu_features = CPU_FTRS_44X,
1288 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1289 .icache_bsize = 32,
1290 .dcache_bsize = 32,
1291 .cpu_setup = __setup_cpu_440epx,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001292 .machine_check = machine_check_440A,
Valentine Barshakd1dfc352007-10-26 04:16:40 +10001293 .platform = "ppc440",
1294 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001295 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001296 .pvr_mask = 0xf0000fff,
1297 .pvr_value = 0x40000440,
1298 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001299 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001300 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001301 .icache_bsize = 32,
1302 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001303 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001304 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001305 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001306 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001307 .pvr_mask = 0xf0000fff,
1308 .pvr_value = 0x40000481,
1309 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001310 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001311 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001312 .icache_bsize = 32,
1313 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001314 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001315 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001316 },
1317 { /* 440GX Rev. A */
1318 .pvr_mask = 0xf0000fff,
1319 .pvr_value = 0x50000850,
1320 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001321 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001322 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001323 .icache_bsize = 32,
1324 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001325 .cpu_setup = __setup_cpu_440gx,
1326 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001327 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001328 },
1329 { /* 440GX Rev. B */
1330 .pvr_mask = 0xf0000fff,
1331 .pvr_value = 0x50000851,
1332 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001333 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001334 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001335 .icache_bsize = 32,
1336 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001337 .cpu_setup = __setup_cpu_440gx,
1338 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001339 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001340 },
1341 { /* 440GX Rev. C */
1342 .pvr_mask = 0xf0000fff,
1343 .pvr_value = 0x50000892,
1344 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001345 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001346 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001347 .icache_bsize = 32,
1348 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001349 .cpu_setup = __setup_cpu_440gx,
1350 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001351 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001352 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001353 { /* 440GX Rev. F */
1354 .pvr_mask = 0xf0000fff,
1355 .pvr_value = 0x50000894,
1356 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001357 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001358 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001359 .icache_bsize = 32,
1360 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001361 .cpu_setup = __setup_cpu_440gx,
1362 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001363 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001364 },
Matt Porter656de7e2005-09-03 15:55:42 -07001365 { /* 440SP Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001366 .pvr_mask = 0xfff00fff,
1367 .pvr_value = 0x53200891,
Matt Porter656de7e2005-09-03 15:55:42 -07001368 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001369 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001370 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001371 .icache_bsize = 32,
1372 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001373 .machine_check = machine_check_4xx,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001374 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001375 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001376 { /* 440SPe Rev. A */
Roland Dreier333e6152007-06-16 05:36:32 +10001377 .pvr_mask = 0xfff00fff,
1378 .pvr_value = 0x53400890,
1379 .cpu_name = "440SPe Rev. A",
1380 .cpu_features = CPU_FTRS_44X,
1381 .cpu_user_features = COMMON_USER_BOOKE,
1382 .icache_bsize = 32,
1383 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001384 .cpu_setup = __setup_cpu_440spe,
1385 .machine_check = machine_check_440A,
Roland Dreier333e6152007-06-16 05:36:32 +10001386 .platform = "ppc440",
1387 },
1388 { /* 440SPe Rev. B */
1389 .pvr_mask = 0xfff00fff,
1390 .pvr_value = 0x53400891,
1391 .cpu_name = "440SPe Rev. B",
Kumar Galaa147c582006-12-08 02:34:38 -06001392 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001393 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001394 .icache_bsize = 32,
1395 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001396 .cpu_setup = __setup_cpu_440spe,
1397 .machine_check = machine_check_440A,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001398 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001399 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001400#endif /* CONFIG_44x */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001401#ifdef CONFIG_FSL_BOOKE
Josh Boyere3e414b2007-12-24 08:44:47 -06001402#ifdef CONFIG_E200
Stephen Rothwell49209602005-10-12 15:55:09 +10001403 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001404 .pvr_mask = 0xfff00000,
1405 .pvr_value = 0x81000000,
1406 .cpu_name = "e200z5",
1407 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001408 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001409 .cpu_user_features = COMMON_USER_BOOKE |
1410 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001411 PPC_FEATURE_UNIFIED_CACHE,
1412 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001413 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001414 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001415 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001416 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001417 .pvr_mask = 0xfff00000,
1418 .pvr_value = 0x81100000,
1419 .cpu_name = "e200z6",
1420 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001421 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001422 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001423 PPC_FEATURE_HAS_SPE_COMP |
1424 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001425 PPC_FEATURE_UNIFIED_CACHE,
1426 .dcache_bsize = 32,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001427 .machine_check = machine_check_e200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001428 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001429 },
Josh Boyere3e414b2007-12-24 08:44:47 -06001430#elif defined(CONFIG_E500)
Stephen Rothwell49209602005-10-12 15:55:09 +10001431 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001432 .pvr_mask = 0xffff0000,
1433 .pvr_value = 0x80200000,
1434 .cpu_name = "e500",
1435 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001436 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001437 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001438 PPC_FEATURE_HAS_SPE_COMP |
1439 PPC_FEATURE_HAS_EFP_SINGLE_COMP,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001440 .icache_bsize = 32,
1441 .dcache_bsize = 32,
1442 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001443 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001444 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001445 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001446 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001447 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001448 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001449 .pvr_mask = 0xffff0000,
1450 .pvr_value = 0x80210000,
1451 .cpu_name = "e500v2",
1452 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001453 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001454 .cpu_user_features = COMMON_USER_BOOKE |
Kumar Gala5e14d212007-09-13 01:44:20 -05001455 PPC_FEATURE_HAS_SPE_COMP |
1456 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1457 PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
Kumar Gala5b37b702005-06-21 17:15:18 -07001458 .icache_bsize = 32,
1459 .dcache_bsize = 32,
1460 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001461 .oprofile_cpu_type = "ppc/e500",
Andy Fleming39aef682008-02-04 18:27:55 -06001462 .oprofile_type = PPC_OPROFILE_FSL_EMB,
Benjamin Herrenschmidt47c0bd12007-12-21 15:39:21 +11001463 .machine_check = machine_check_e500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001464 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001465 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001466#endif
Josh Boyere3e414b2007-12-24 08:44:47 -06001467#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07001468#if !CLASSIC_PPC
1469 { /* default match */
1470 .pvr_mask = 0x00000000,
1471 .pvr_value = 0x00000000,
1472 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001473 .cpu_features = CPU_FTRS_GENERIC_32,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001474 .cpu_user_features = PPC_FEATURE_32,
1475 .icache_bsize = 32,
1476 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001477 .platform = "powerpc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001478 }
1479#endif /* !CLASSIC_PPC */
Stephen Rothwell49209602005-10-12 15:55:09 +10001480#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001481};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001482
Paul Mackerras87a72f92007-10-04 14:18:01 +10001483static struct cpu_spec the_cpu_spec;
1484
1485struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001486{
1487 struct cpu_spec *s = cpu_specs;
Paul Mackerras87a72f92007-10-04 14:18:01 +10001488 struct cpu_spec *t = &the_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001489 int i;
1490
1491 s = PTRRELOC(s);
Paul Mackerras87a72f92007-10-04 14:18:01 +10001492 t = PTRRELOC(t);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001493
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001494 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1495 if ((pvr & s->pvr_mask) == s->pvr_value) {
Paul Mackerras87a72f92007-10-04 14:18:01 +10001496 /*
1497 * If we are overriding a previous value derived
1498 * from the real PVR with a new value obtained
1499 * using a logical PVR value, don't modify the
1500 * performance monitor fields.
1501 */
1502 if (t->num_pmcs && !s->num_pmcs) {
1503 t->cpu_name = s->cpu_name;
1504 t->cpu_features = s->cpu_features;
1505 t->cpu_user_features = s->cpu_user_features;
1506 t->icache_bsize = s->icache_bsize;
1507 t->dcache_bsize = s->dcache_bsize;
1508 t->cpu_setup = s->cpu_setup;
1509 t->cpu_restore = s->cpu_restore;
1510 t->platform = s->platform;
1511 } else
1512 *t = *s;
1513 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001514#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1515 /* ppc64 and booke expect identify_cpu to also call
1516 * setup_cpu for that processor. I will consolidate
1517 * that at a later time, for now, just use #ifdef.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001518 * we also don't need to PTRRELOC the function pointer
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001519 * on ppc64 and booke as we are running at 0 in real
1520 * mode on ppc64 and reloc_offset is always 0 on booke.
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001521 */
1522 if (s->cpu_setup) {
1523 s->cpu_setup(offset, s);
1524 }
Valentine Barshak84e3ad52007-09-22 00:44:38 +10001525#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001526 return s;
1527 }
1528 BUG();
1529 return NULL;
1530}
1531
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001532void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001533{
1534 struct fixup_entry {
1535 unsigned long mask;
1536 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001537 long start_off;
1538 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001539 } *fcur, *fend;
1540
1541 fcur = fixup_start;
1542 fend = fixup_end;
1543
1544 for (; fcur < fend; fcur++) {
1545 unsigned int *pstart, *pend, *p;
1546
1547 if ((value & fcur->mask) == fcur->value)
1548 continue;
1549
1550 /* These PTRRELOCs will disappear once the new scheme for
1551 * modules and vdso is implemented
1552 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001553 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1554 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001555
1556 for (p = pstart; p < pend; p++) {
1557 *p = 0x60000000u;
1558 asm volatile ("dcbst 0, %0" : : "r" (p));
1559 }
1560 asm volatile ("sync" : : : "memory");
1561 for (p = pstart; p < pend; p++)
1562 asm volatile ("icbi 0,%0" : : "r" (p));
1563 asm volatile ("sync; isync" : : : "memory");
1564 }
1565}