blob: 9cb24d20f0f94e48866df01619dece8c369a5ff4 [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
Kumar Gala400d2212005-09-27 15:13:12 -050034extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
36extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
37extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
40extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
41extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell49209602005-10-12 15:55:09 +100042#endif /* CONFIG_PPC32 */
Olof Johanssonf39b7a52006-08-11 00:07:08 -050043#ifdef CONFIG_PPC64
Kumar Gala400d2212005-09-27 15:13:12 -050044extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
Olof Johansson5b43d202006-10-04 23:41:41 -050045extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
Olof Johansson11999192007-02-04 16:36:51 -060046extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
Stephen Rothwell40d244d2007-02-12 22:10:48 +110047extern void __restore_cpu_pa6t(void);
Olof Johanssonf39b7a52006-08-11 00:07:08 -050048extern void __restore_cpu_ppc970(void);
49#endif /* CONFIG_PPC64 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
Linus Torvalds1da177e2005-04-16 15:20:36 -070051/* This table only contains "desktop" CPUs, it need to be filled with embedded
52 * ones as well...
53 */
Stephen Rothwell49209602005-10-12 15:55:09 +100054#define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
55 PPC_FEATURE_HAS_MMU)
56#define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +110057#define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +110058#define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
60#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
61 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
Anton Blanchard03054d52006-04-29 09:51:06 +100062#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
Paul Mackerrasfab5db92006-06-07 16:14:40 +100063 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
64 PPC_FEATURE_TRUE_LE)
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -050065#define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
66 PPC_FEATURE_TRUE_LE | \
67 PPC_FEATURE_HAS_ALTIVEC_COMP)
Paul Mackerras80f15dc2006-01-14 10:11:39 +110068#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
69 PPC_FEATURE_BOOKE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
Linus Torvalds1da177e2005-04-16 15:20:36 -070071/* We only set the spe features if the kernel was compiled with
72 * spe support
73 */
74#ifdef CONFIG_SPE
Stephen Rothwell49209602005-10-12 15:55:09 +100075#define PPC_FEATURE_SPE_COMP PPC_FEATURE_HAS_SPE
Linus Torvalds1da177e2005-04-16 15:20:36 -070076#else
Stephen Rothwell49209602005-10-12 15:55:09 +100077#define PPC_FEATURE_SPE_COMP 0
Linus Torvalds1da177e2005-04-16 15:20:36 -070078#endif
79
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +100080static struct cpu_spec cpu_specs[] = {
Stephen Rothwell49209602005-10-12 15:55:09 +100081#ifdef CONFIG_PPC64
82 { /* Power3 */
83 .pvr_mask = 0xffff0000,
84 .pvr_value = 0x00400000,
85 .cpu_name = "POWER3 (630)",
86 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +100087 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +100088 .icache_bsize = 128,
89 .dcache_bsize = 128,
90 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -060091 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +100092 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +000093 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +110094 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +100095 },
96 { /* Power3+ */
97 .pvr_mask = 0xffff0000,
98 .pvr_value = 0x00410000,
99 .cpu_name = "POWER3 (630+)",
100 .cpu_features = CPU_FTRS_POWER3,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000101 .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000102 .icache_bsize = 128,
103 .dcache_bsize = 128,
104 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600105 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000106 .oprofile_cpu_type = "ppc64/power3",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000107 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100108 .platform = "power3",
Stephen Rothwell49209602005-10-12 15:55:09 +1000109 },
110 { /* Northstar */
111 .pvr_mask = 0xffff0000,
112 .pvr_value = 0x00330000,
113 .cpu_name = "RS64-II (northstar)",
114 .cpu_features = CPU_FTRS_RS64,
115 .cpu_user_features = COMMON_USER_PPC64,
116 .icache_bsize = 128,
117 .dcache_bsize = 128,
118 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600119 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000120 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000121 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100122 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000123 },
124 { /* Pulsar */
125 .pvr_mask = 0xffff0000,
126 .pvr_value = 0x00340000,
127 .cpu_name = "RS64-III (pulsar)",
128 .cpu_features = CPU_FTRS_RS64,
129 .cpu_user_features = COMMON_USER_PPC64,
130 .icache_bsize = 128,
131 .dcache_bsize = 128,
132 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600133 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000134 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000135 .oprofile_type = PPC_OPROFILE_RS64,
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100150 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000151 },
152 { /* S-star */
153 .pvr_mask = 0xffff0000,
154 .pvr_value = 0x00370000,
155 .cpu_name = "RS64-IV (sstar)",
156 .cpu_features = CPU_FTRS_RS64,
157 .cpu_user_features = COMMON_USER_PPC64,
158 .icache_bsize = 128,
159 .dcache_bsize = 128,
160 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600161 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000162 .oprofile_cpu_type = "ppc64/rs64",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000163 .oprofile_type = PPC_OPROFILE_RS64,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100164 .platform = "rs64",
Stephen Rothwell49209602005-10-12 15:55:09 +1000165 },
166 { /* Power4 */
167 .pvr_mask = 0xffff0000,
168 .pvr_value = 0x00350000,
169 .cpu_name = "POWER4 (gp)",
170 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100171 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000172 .icache_bsize = 128,
173 .dcache_bsize = 128,
174 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600175 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000176 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000177 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100178 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000179 },
180 { /* Power4+ */
181 .pvr_mask = 0xffff0000,
182 .pvr_value = 0x00380000,
183 .cpu_name = "POWER4+ (gq)",
184 .cpu_features = CPU_FTRS_POWER4,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100185 .cpu_user_features = COMMON_USER_POWER4,
Stephen Rothwell49209602005-10-12 15:55:09 +1000186 .icache_bsize = 128,
187 .dcache_bsize = 128,
188 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600189 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000190 .oprofile_cpu_type = "ppc64/power4",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000191 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100192 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000193 },
194 { /* PPC970 */
195 .pvr_mask = 0xffff0000,
196 .pvr_value = 0x00390000,
197 .cpu_name = "PPC970",
198 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100199 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000200 PPC_FEATURE_HAS_ALTIVEC_COMP,
201 .icache_bsize = 128,
202 .dcache_bsize = 128,
203 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600204 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000205 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500206 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000207 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000208 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100209 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000210 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000211 { /* PPC970FX */
212 .pvr_mask = 0xffff0000,
213 .pvr_value = 0x003c0000,
214 .cpu_name = "PPC970FX",
Stephen Rothwell49209602005-10-12 15:55:09 +1000215 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100216 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000217 PPC_FEATURE_HAS_ALTIVEC_COMP,
218 .icache_bsize = 128,
219 .dcache_bsize = 128,
220 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600221 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000222 .cpu_setup = __setup_cpu_ppc970,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500223 .cpu_restore = __restore_cpu_ppc970,
Stephen Rothwell49209602005-10-12 15:55:09 +1000224 .oprofile_cpu_type = "ppc64/970",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000225 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100226 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000227 },
Olof Johansson3546e812007-02-26 00:35:14 -0600228 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
229 .pvr_mask = 0xffffffff,
230 .pvr_value = 0x00440100,
231 .cpu_name = "PPC970MP",
232 .cpu_features = CPU_FTRS_PPC970,
233 .cpu_user_features = COMMON_USER_POWER4 |
234 PPC_FEATURE_HAS_ALTIVEC_COMP,
235 .icache_bsize = 128,
236 .dcache_bsize = 128,
237 .num_pmcs = 8,
238 .cpu_setup = __setup_cpu_ppc970,
239 .cpu_restore = __restore_cpu_ppc970,
240 .oprofile_cpu_type = "ppc64/970MP",
241 .oprofile_type = PPC_OPROFILE_POWER4,
242 .platform = "ppc970",
243 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000244 { /* PPC970MP */
245 .pvr_mask = 0xffff0000,
246 .pvr_value = 0x00440000,
247 .cpu_name = "PPC970MP",
248 .cpu_features = CPU_FTRS_PPC970,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100249 .cpu_user_features = COMMON_USER_POWER4 |
Stephen Rothwell49209602005-10-12 15:55:09 +1000250 PPC_FEATURE_HAS_ALTIVEC_COMP,
251 .icache_bsize = 128,
252 .dcache_bsize = 128,
Anton Blanchard87af41b2006-05-05 05:44:26 +1000253 .num_pmcs = 8,
Olof Johansson5b43d202006-10-04 23:41:41 -0500254 .cpu_setup = __setup_cpu_ppc970MP,
Olof Johanssonf39b7a52006-08-11 00:07:08 -0500255 .cpu_restore = __restore_cpu_ppc970,
Mike Wolffecb3522006-11-21 14:41:54 -0600256 .oprofile_cpu_type = "ppc64/970MP",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000257 .oprofile_type = PPC_OPROFILE_POWER4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100258 .platform = "ppc970",
Stephen Rothwell49209602005-10-12 15:55:09 +1000259 },
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500260 { /* PPC970GX */
261 .pvr_mask = 0xffff0000,
262 .pvr_value = 0x00450000,
263 .cpu_name = "PPC970GX",
264 .cpu_features = CPU_FTRS_PPC970,
265 .cpu_user_features = COMMON_USER_POWER4 |
266 PPC_FEATURE_HAS_ALTIVEC_COMP,
267 .icache_bsize = 128,
268 .dcache_bsize = 128,
269 .num_pmcs = 8,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600270 .pmc_type = PPC_PMC_IBM,
Jake Moilanen362ff7b2006-10-18 10:47:22 -0500271 .cpu_setup = __setup_cpu_ppc970,
272 .oprofile_cpu_type = "ppc64/970",
273 .oprofile_type = PPC_OPROFILE_POWER4,
274 .platform = "ppc970",
275 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100276 { /* Power5 GR */
Stephen Rothwell49209602005-10-12 15:55:09 +1000277 .pvr_mask = 0xffff0000,
278 .pvr_value = 0x003a0000,
279 .cpu_name = "POWER5 (gr)",
280 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100281 .cpu_user_features = COMMON_USER_POWER5,
Stephen Rothwell49209602005-10-12 15:55:09 +1000282 .icache_bsize = 128,
283 .dcache_bsize = 128,
284 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600285 .pmc_type = PPC_PMC_IBM,
Stephen Rothwell49209602005-10-12 15:55:09 +1000286 .oprofile_cpu_type = "ppc64/power5",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000287 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000288 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
289 * and above but only works on POWER5 and above
290 */
291 .oprofile_mmcra_sihv = MMCRA_SIHV,
292 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100293 .platform = "power5",
Stephen Rothwell49209602005-10-12 15:55:09 +1000294 },
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100295 { /* Power5 GS */
Stephen Rothwell49209602005-10-12 15:55:09 +1000296 .pvr_mask = 0xffff0000,
297 .pvr_value = 0x003b0000,
Anton Blanchard834608f2006-01-09 15:42:30 +1100298 .cpu_name = "POWER5+ (gs)",
Stephen Rothwell49209602005-10-12 15:55:09 +1000299 .cpu_features = CPU_FTRS_POWER5,
Paul Mackerrasa7ddc5e2005-11-10 14:29:18 +1100300 .cpu_user_features = COMMON_USER_POWER5_PLUS,
Stephen Rothwell49209602005-10-12 15:55:09 +1000301 .icache_bsize = 128,
302 .dcache_bsize = 128,
303 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600304 .pmc_type = PPC_PMC_IBM,
Anton Blanchard834608f2006-01-09 15:42:30 +1100305 .oprofile_cpu_type = "ppc64/power5+",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000306 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000307 .oprofile_mmcra_sihv = MMCRA_SIHV,
308 .oprofile_mmcra_sipr = MMCRA_SIPR,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100309 .platform = "power5+",
Stephen Rothwell49209602005-10-12 15:55:09 +1000310 },
Paul Mackerras974a76f2006-11-10 20:38:53 +1100311 { /* POWER6 in P5+ mode; 2.04-compliant processor */
312 .pvr_mask = 0xffffffff,
313 .pvr_value = 0x0f000001,
314 .cpu_name = "POWER5+",
315 .cpu_features = CPU_FTRS_POWER5,
316 .cpu_user_features = COMMON_USER_POWER5_PLUS,
317 .icache_bsize = 128,
318 .dcache_bsize = 128,
319 .num_pmcs = 6,
320 .oprofile_cpu_type = "ppc64/power6",
321 .oprofile_type = PPC_OPROFILE_POWER4,
322 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
323 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
324 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
325 POWER6_MMCRA_OTHER,
326 .platform = "power5+",
327 },
Anton Blanchard03054d52006-04-29 09:51:06 +1000328 { /* Power6 */
329 .pvr_mask = 0xffff0000,
330 .pvr_value = 0x003e0000,
Paul Mackerras974a76f2006-11-10 20:38:53 +1100331 .cpu_name = "POWER6 (raw)",
332 .cpu_features = CPU_FTRS_POWER6,
333 .cpu_user_features = COMMON_USER_POWER6 |
334 PPC_FEATURE_POWER6_EXT,
335 .icache_bsize = 128,
336 .dcache_bsize = 128,
337 .num_pmcs = 6,
338 .oprofile_cpu_type = "ppc64/power6",
339 .oprofile_type = PPC_OPROFILE_POWER4,
340 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
341 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
342 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
343 POWER6_MMCRA_OTHER,
344 .platform = "power6x",
345 },
346 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
347 .pvr_mask = 0xffffffff,
348 .pvr_value = 0x0f000002,
349 .cpu_name = "POWER6 (architected)",
Anton Blanchard03054d52006-04-29 09:51:06 +1000350 .cpu_features = CPU_FTRS_POWER6,
351 .cpu_user_features = COMMON_USER_POWER6,
352 .icache_bsize = 128,
353 .dcache_bsize = 128,
Anton Blanchard99f48612006-10-13 12:13:12 +1000354 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600355 .pmc_type = PPC_PMC_IBM,
Anton Blanchard03054d52006-04-29 09:51:06 +1000356 .oprofile_cpu_type = "ppc64/power6",
357 .oprofile_type = PPC_OPROFILE_POWER4,
Michael Neulinge78dbc82006-06-08 14:42:34 +1000358 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
359 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
360 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
361 POWER6_MMCRA_OTHER,
Anton Blanchard03054d52006-04-29 09:51:06 +1000362 .platform = "power6",
363 },
Arnd Bergmannc902be72006-01-04 19:55:53 +0000364 { /* Cell Broadband Engine */
Stephen Rothwell49209602005-10-12 15:55:09 +1000365 .pvr_mask = 0xffff0000,
366 .pvr_value = 0x00700000,
367 .cpu_name = "Cell Broadband Engine",
368 .cpu_features = CPU_FTRS_CELL,
369 .cpu_user_features = COMMON_USER_PPC64 |
Benjamin Herrenschmidtaa5cb022006-03-01 15:07:07 +1100370 PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
371 PPC_FEATURE_SMT,
Stephen Rothwell49209602005-10-12 15:55:09 +1000372 .icache_bsize = 128,
373 .dcache_bsize = 128,
Maynard Johnson18f21902006-11-20 18:45:16 +0100374 .num_pmcs = 4,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600375 .pmc_type = PPC_PMC_IBM,
Maynard Johnson18f21902006-11-20 18:45:16 +0100376 .oprofile_cpu_type = "ppc64/cell-be",
377 .oprofile_type = PPC_OPROFILE_CELL,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100378 .platform = "ppc-cell-be",
Stephen Rothwell49209602005-10-12 15:55:09 +1000379 },
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500380 { /* PA Semi PA6T */
381 .pvr_mask = 0x7fff0000,
382 .pvr_value = 0x00900000,
383 .cpu_name = "PA6T",
384 .cpu_features = CPU_FTRS_PA6T,
385 .cpu_user_features = COMMON_USER_PA6T,
386 .icache_bsize = 64,
387 .dcache_bsize = 64,
388 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600389 .pmc_type = PPC_PMC_PA6T,
Olof Johansson11999192007-02-04 16:36:51 -0600390 .cpu_setup = __setup_cpu_pa6t,
391 .cpu_restore = __restore_cpu_pa6t,
Olof Johansson25fc5302007-04-18 16:38:21 +1000392 .oprofile_cpu_type = "ppc64/pa6t",
393 .oprofile_type = PPC_OPROFILE_PA6T,
Olof Johanssonb3ebd1d2006-09-06 14:35:57 -0500394 .platform = "pa6t",
395 },
Stephen Rothwell49209602005-10-12 15:55:09 +1000396 { /* default match */
397 .pvr_mask = 0x00000000,
398 .pvr_value = 0x00000000,
399 .cpu_name = "POWER4 (compatible)",
400 .cpu_features = CPU_FTRS_COMPATIBLE,
401 .cpu_user_features = COMMON_USER_PPC64,
402 .icache_bsize = 128,
403 .dcache_bsize = 128,
404 .num_pmcs = 6,
Olof Johansson1bd2e5a2007-01-28 21:23:54 -0600405 .pmc_type = PPC_PMC_IBM,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100406 .platform = "power4",
Stephen Rothwell49209602005-10-12 15:55:09 +1000407 }
408#endif /* CONFIG_PPC64 */
409#ifdef CONFIG_PPC32
Linus Torvalds1da177e2005-04-16 15:20:36 -0700410#if CLASSIC_PPC
Stephen Rothwell49209602005-10-12 15:55:09 +1000411 { /* 601 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700412 .pvr_mask = 0xffff0000,
413 .pvr_value = 0x00010000,
414 .cpu_name = "601",
Kumar Gala10b35d92005-09-23 14:08:58 -0500415 .cpu_features = CPU_FTRS_PPC601,
Stephen Rothwell49209602005-10-12 15:55:09 +1000416 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
Paul Mackerras98599012005-10-22 16:51:34 +1000417 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700418 .icache_bsize = 32,
419 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100420 .platform = "ppc601",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700421 },
422 { /* 603 */
423 .pvr_mask = 0xffff0000,
424 .pvr_value = 0x00030000,
425 .cpu_name = "603",
Kumar Gala10b35d92005-09-23 14:08:58 -0500426 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000427 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700428 .icache_bsize = 32,
429 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100430 .cpu_setup = __setup_cpu_603,
431 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700432 },
433 { /* 603e */
434 .pvr_mask = 0xffff0000,
435 .pvr_value = 0x00060000,
436 .cpu_name = "603e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500437 .cpu_features = CPU_FTRS_603,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000438 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439 .icache_bsize = 32,
440 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100441 .cpu_setup = __setup_cpu_603,
442 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700443 },
444 { /* 603ev */
445 .pvr_mask = 0xffff0000,
446 .pvr_value = 0x00070000,
447 .cpu_name = "603ev",
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,
453 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700454 },
455 { /* 604 */
456 .pvr_mask = 0xffff0000,
457 .pvr_value = 0x00040000,
458 .cpu_name = "604",
Kumar Gala10b35d92005-09-23 14:08:58 -0500459 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000460 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700461 .icache_bsize = 32,
462 .dcache_bsize = 32,
463 .num_pmcs = 2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100464 .cpu_setup = __setup_cpu_604,
465 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700466 },
467 { /* 604e */
468 .pvr_mask = 0xfffff000,
469 .pvr_value = 0x00090000,
470 .cpu_name = "604e",
Kumar Gala10b35d92005-09-23 14:08:58 -0500471 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000472 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700473 .icache_bsize = 32,
474 .dcache_bsize = 32,
475 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100476 .cpu_setup = __setup_cpu_604,
477 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700478 },
479 { /* 604r */
480 .pvr_mask = 0xffff0000,
481 .pvr_value = 0x00090000,
482 .cpu_name = "604r",
Kumar Gala10b35d92005-09-23 14:08:58 -0500483 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000484 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700485 .icache_bsize = 32,
486 .dcache_bsize = 32,
487 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100488 .cpu_setup = __setup_cpu_604,
489 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490 },
491 { /* 604ev */
492 .pvr_mask = 0xffff0000,
493 .pvr_value = 0x000a0000,
494 .cpu_name = "604ev",
Kumar Gala10b35d92005-09-23 14:08:58 -0500495 .cpu_features = CPU_FTRS_604,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000496 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700497 .icache_bsize = 32,
498 .dcache_bsize = 32,
499 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100500 .cpu_setup = __setup_cpu_604,
501 .platform = "ppc604",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502 },
503 { /* 740/750 (0x4202, don't support TAU ?) */
504 .pvr_mask = 0xffffffff,
505 .pvr_value = 0x00084202,
506 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500507 .cpu_features = CPU_FTRS_740_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000508 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700509 .icache_bsize = 32,
510 .dcache_bsize = 32,
511 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100512 .cpu_setup = __setup_cpu_750,
513 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700514 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700515 { /* 750CX (80100 and 8010x?) */
516 .pvr_mask = 0xfffffff0,
517 .pvr_value = 0x00080100,
518 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500519 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000520 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700521 .icache_bsize = 32,
522 .dcache_bsize = 32,
523 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100524 .cpu_setup = __setup_cpu_750cx,
525 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700526 },
527 { /* 750CX (82201 and 82202) */
528 .pvr_mask = 0xfffffff0,
529 .pvr_value = 0x00082200,
530 .cpu_name = "750CX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500531 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000532 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700533 .icache_bsize = 32,
534 .dcache_bsize = 32,
535 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100536 .cpu_setup = __setup_cpu_750cx,
537 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538 },
539 { /* 750CXe (82214) */
540 .pvr_mask = 0xfffffff0,
541 .pvr_value = 0x00082210,
542 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500543 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000544 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 .icache_bsize = 32,
546 .dcache_bsize = 32,
547 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100548 .cpu_setup = __setup_cpu_750cx,
549 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700550 },
Arthur Othieno7c316252005-09-03 15:55:52 -0700551 { /* 750CXe "Gekko" (83214) */
552 .pvr_mask = 0xffffffff,
553 .pvr_value = 0x00083214,
554 .cpu_name = "750CXe",
Kumar Gala10b35d92005-09-23 14:08:58 -0500555 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000556 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othieno7c316252005-09-03 15:55:52 -0700557 .icache_bsize = 32,
558 .dcache_bsize = 32,
559 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100560 .cpu_setup = __setup_cpu_750cx,
561 .platform = "ppc750",
Arthur Othieno7c316252005-09-03 15:55:52 -0700562 },
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500563 { /* 750CL */
564 .pvr_mask = 0xfffff0f0,
565 .pvr_value = 0x00087010,
566 .cpu_name = "750CL",
Josh Boyera14c4502007-04-13 04:33:25 +1000567 .cpu_features = CPU_FTRS_750CL,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500568 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
569 .icache_bsize = 32,
570 .dcache_bsize = 32,
571 .num_pmcs = 4,
Josh Boyera14c4502007-04-13 04:33:25 +1000572 .cpu_setup = __setup_cpu_750,
Jake Moilanencfbff8a2006-10-03 14:29:34 -0500573 .platform = "ppc750",
574 },
Arthur Othienoac1ff042005-09-03 15:55:51 -0700575 { /* 745/755 */
576 .pvr_mask = 0xfffff000,
577 .pvr_value = 0x00083000,
578 .cpu_name = "745/755",
Kumar Gala10b35d92005-09-23 14:08:58 -0500579 .cpu_features = CPU_FTRS_750,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000580 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Arthur Othienoac1ff042005-09-03 15:55:51 -0700581 .icache_bsize = 32,
582 .dcache_bsize = 32,
583 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100584 .cpu_setup = __setup_cpu_750,
585 .platform = "ppc750",
Arthur Othienoac1ff042005-09-03 15:55:51 -0700586 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700587 { /* 750FX rev 1.x */
588 .pvr_mask = 0xffffff00,
589 .pvr_value = 0x70000100,
590 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500591 .cpu_features = CPU_FTRS_750FX1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000592 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700593 .icache_bsize = 32,
594 .dcache_bsize = 32,
595 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100596 .cpu_setup = __setup_cpu_750,
597 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700598 },
599 { /* 750FX rev 2.0 must disable HID0[DPM] */
600 .pvr_mask = 0xffffffff,
601 .pvr_value = 0x70000200,
602 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500603 .cpu_features = CPU_FTRS_750FX2,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000604 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700605 .icache_bsize = 32,
606 .dcache_bsize = 32,
607 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100608 .cpu_setup = __setup_cpu_750,
609 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 },
611 { /* 750FX (All revs except 2.0) */
612 .pvr_mask = 0xffff0000,
613 .pvr_value = 0x70000000,
614 .cpu_name = "750FX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500615 .cpu_features = CPU_FTRS_750FX,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000616 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700617 .icache_bsize = 32,
618 .dcache_bsize = 32,
619 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100620 .cpu_setup = __setup_cpu_750fx,
621 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700622 },
623 { /* 750GX */
624 .pvr_mask = 0xffff0000,
625 .pvr_value = 0x70020000,
626 .cpu_name = "750GX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500627 .cpu_features = CPU_FTRS_750GX,
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_750fx,
633 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634 },
635 { /* 740/750 (L2CR bit need fixup for 740) */
636 .pvr_mask = 0xffff0000,
637 .pvr_value = 0x00080000,
638 .cpu_name = "740/750",
Kumar Gala10b35d92005-09-23 14:08:58 -0500639 .cpu_features = CPU_FTRS_740,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000640 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 .icache_bsize = 32,
642 .dcache_bsize = 32,
643 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100644 .cpu_setup = __setup_cpu_750,
645 .platform = "ppc750",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 },
647 { /* 7400 rev 1.1 ? (no TAU) */
648 .pvr_mask = 0xffffffff,
649 .pvr_value = 0x000c1101,
650 .cpu_name = "7400 (1.1)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500651 .cpu_features = CPU_FTRS_7400_NOTAU,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000652 .cpu_user_features = COMMON_USER |
653 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700654 .icache_bsize = 32,
655 .dcache_bsize = 32,
656 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100657 .cpu_setup = __setup_cpu_7400,
658 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 },
660 { /* 7400 */
661 .pvr_mask = 0xffff0000,
662 .pvr_value = 0x000c0000,
663 .cpu_name = "7400",
Kumar Gala10b35d92005-09-23 14:08:58 -0500664 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000665 .cpu_user_features = COMMON_USER |
666 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700667 .icache_bsize = 32,
668 .dcache_bsize = 32,
669 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100670 .cpu_setup = __setup_cpu_7400,
671 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700672 },
673 { /* 7410 */
674 .pvr_mask = 0xffff0000,
675 .pvr_value = 0x800c0000,
676 .cpu_name = "7410",
Kumar Gala10b35d92005-09-23 14:08:58 -0500677 .cpu_features = CPU_FTRS_7400,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000678 .cpu_user_features = COMMON_USER |
679 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680 .icache_bsize = 32,
681 .dcache_bsize = 32,
682 .num_pmcs = 4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100683 .cpu_setup = __setup_cpu_7410,
684 .platform = "ppc7400",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700685 },
686 { /* 7450 2.0 - no doze/nap */
687 .pvr_mask = 0xffffffff,
688 .pvr_value = 0x80000200,
689 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500690 .cpu_features = CPU_FTRS_7450_20,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000691 .cpu_user_features = COMMON_USER |
692 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700693 .icache_bsize = 32,
694 .dcache_bsize = 32,
695 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600696 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600697 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000698 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100699 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700700 },
701 { /* 7450 2.1 */
702 .pvr_mask = 0xffffffff,
703 .pvr_value = 0x80000201,
704 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500705 .cpu_features = CPU_FTRS_7450_21,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000706 .cpu_user_features = COMMON_USER |
707 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700708 .icache_bsize = 32,
709 .dcache_bsize = 32,
710 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600711 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600712 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000713 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100714 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700715 },
716 { /* 7450 2.3 and newer */
717 .pvr_mask = 0xffff0000,
718 .pvr_value = 0x80000000,
719 .cpu_name = "7450",
Kumar Gala10b35d92005-09-23 14:08:58 -0500720 .cpu_features = CPU_FTRS_7450_23,
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 = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600726 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600727 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000728 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100729 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700730 },
731 { /* 7455 rev 1.x */
732 .pvr_mask = 0xffffff00,
733 .pvr_value = 0x80010100,
734 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500735 .cpu_features = CPU_FTRS_7455_1,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000736 .cpu_user_features = COMMON_USER |
737 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700738 .icache_bsize = 32,
739 .dcache_bsize = 32,
740 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600741 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600742 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000743 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100744 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700745 },
746 { /* 7455 rev 2.0 */
747 .pvr_mask = 0xffffffff,
748 .pvr_value = 0x80010200,
749 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500750 .cpu_features = CPU_FTRS_7455_20,
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,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100759 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700760 },
761 { /* 7455 others */
762 .pvr_mask = 0xffff0000,
763 .pvr_value = 0x80010000,
764 .cpu_name = "7455",
Kumar Gala10b35d92005-09-23 14:08:58 -0500765 .cpu_features = CPU_FTRS_7455,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000766 .cpu_user_features = COMMON_USER |
767 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700768 .icache_bsize = 32,
769 .dcache_bsize = 32,
770 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600771 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600772 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000773 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100774 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700775 },
776 { /* 7447/7457 Rev 1.0 */
777 .pvr_mask = 0xffffffff,
778 .pvr_value = 0x80020100,
779 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500780 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000781 .cpu_user_features = COMMON_USER |
782 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700783 .icache_bsize = 32,
784 .dcache_bsize = 32,
785 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600786 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600787 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000788 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100789 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700790 },
791 { /* 7447/7457 Rev 1.1 */
792 .pvr_mask = 0xffffffff,
793 .pvr_value = 0x80020101,
794 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500795 .cpu_features = CPU_FTRS_7447_10,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000796 .cpu_user_features = COMMON_USER |
797 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700798 .icache_bsize = 32,
799 .dcache_bsize = 32,
800 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600801 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600802 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000803 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100804 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700805 },
806 { /* 7447/7457 Rev 1.2 and later */
807 .pvr_mask = 0xffff0000,
808 .pvr_value = 0x80020000,
809 .cpu_name = "7447/7457",
Kumar Gala10b35d92005-09-23 14:08:58 -0500810 .cpu_features = CPU_FTRS_7447,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000811 .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700812 .icache_bsize = 32,
813 .dcache_bsize = 32,
814 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600815 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600816 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000817 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100818 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700819 },
820 { /* 7447A */
821 .pvr_mask = 0xffff0000,
822 .pvr_value = 0x80030000,
823 .cpu_name = "7447A",
Kumar Gala10b35d92005-09-23 14:08:58 -0500824 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000825 .cpu_user_features = COMMON_USER |
826 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700827 .icache_bsize = 32,
828 .dcache_bsize = 32,
829 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600830 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600831 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000832 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100833 .platform = "ppc7450",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700834 },
Kumar Galabbde6302005-09-03 15:55:55 -0700835 { /* 7448 */
836 .pvr_mask = 0xffff0000,
837 .pvr_value = 0x80040000,
838 .cpu_name = "7448",
Kumar Gala10b35d92005-09-23 14:08:58 -0500839 .cpu_features = CPU_FTRS_7447A,
Paul Mackerrasfab5db92006-06-07 16:14:40 +1000840 .cpu_user_features = COMMON_USER |
841 PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
Kumar Galabbde6302005-09-03 15:55:55 -0700842 .icache_bsize = 32,
843 .dcache_bsize = 32,
844 .num_pmcs = 6,
Andy Fleming555d97a2005-12-15 20:02:04 -0600845 .cpu_setup = __setup_cpu_745x,
Andy Fleming555d97a2005-12-15 20:02:04 -0600846 .oprofile_cpu_type = "ppc/7450",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +0000847 .oprofile_type = PPC_OPROFILE_G4,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100848 .platform = "ppc7450",
Kumar Galabbde6302005-09-03 15:55:55 -0700849 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
851 .pvr_mask = 0x7fff0000,
852 .pvr_value = 0x00810000,
853 .cpu_name = "82xx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500854 .cpu_features = CPU_FTRS_82XX,
Stephen Rothwell49209602005-10-12 15:55:09 +1000855 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700856 .icache_bsize = 32,
857 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100858 .cpu_setup = __setup_cpu_603,
859 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700860 },
861 { /* All G2_LE (603e core, plus some) have the same pvr */
862 .pvr_mask = 0x7fff0000,
863 .pvr_value = 0x00820000,
864 .cpu_name = "G2_LE",
Kumar Gala10b35d92005-09-23 14:08:58 -0500865 .cpu_features = CPU_FTRS_G2_LE,
Stephen Rothwell49209602005-10-12 15:55:09 +1000866 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700867 .icache_bsize = 32,
868 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100869 .cpu_setup = __setup_cpu_603,
870 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700871 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500872 { /* e300c1 (a 603e core, plus some) on 83xx */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700873 .pvr_mask = 0x7fff0000,
874 .pvr_value = 0x00830000,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500875 .cpu_name = "e300c1",
Kumar Gala10b35d92005-09-23 14:08:58 -0500876 .cpu_features = CPU_FTRS_E300,
Stephen Rothwell49209602005-10-12 15:55:09 +1000877 .cpu_user_features = COMMON_USER,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700878 .icache_bsize = 32,
879 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100880 .cpu_setup = __setup_cpu_603,
881 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882 },
Kim Phillips6c4a2502006-10-02 20:10:24 -0500883 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
884 .pvr_mask = 0x7fff0000,
885 .pvr_value = 0x00840000,
886 .cpu_name = "e300c2",
Kim Phillipsaa42c692006-12-08 02:43:30 -0600887 .cpu_features = CPU_FTRS_E300C2,
Kim Phillips6c4a2502006-10-02 20:10:24 -0500888 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
889 .icache_bsize = 32,
890 .dcache_bsize = 32,
891 .cpu_setup = __setup_cpu_603,
892 .platform = "ppc603",
893 },
Scott Wood57933f82006-12-01 12:57:05 -0600894 { /* e300c3 on 83xx */
895 .pvr_mask = 0x7fff0000,
896 .pvr_value = 0x00850000,
897 .cpu_name = "e300c3",
898 .cpu_features = CPU_FTRS_E300,
899 .cpu_user_features = COMMON_USER,
900 .icache_bsize = 32,
901 .dcache_bsize = 32,
902 .cpu_setup = __setup_cpu_603,
903 .platform = "ppc603",
904 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700905 { /* default match, we assume split I/D cache & TB (non-601)... */
906 .pvr_mask = 0x00000000,
907 .pvr_value = 0x00000000,
908 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -0500909 .cpu_features = CPU_FTRS_CLASSIC32,
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 .platform = "ppc603",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700914 },
915#endif /* CLASSIC_PPC */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916#ifdef CONFIG_8xx
917 { /* 8xx */
918 .pvr_mask = 0xffff0000,
919 .pvr_value = 0x00500000,
920 .cpu_name = "8xx",
921 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
922 * if the 8xx code is there.... */
Kumar Gala10b35d92005-09-23 14:08:58 -0500923 .cpu_features = CPU_FTRS_8XX,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700924 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
925 .icache_bsize = 16,
926 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100927 .platform = "ppc823",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928 },
929#endif /* CONFIG_8xx */
930#ifdef CONFIG_40x
931 { /* 403GC */
932 .pvr_mask = 0xffffff00,
933 .pvr_value = 0x00200200,
934 .cpu_name = "403GC",
Kumar Gala10b35d92005-09-23 14:08:58 -0500935 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700936 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
937 .icache_bsize = 16,
938 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100939 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 },
941 { /* 403GCX */
942 .pvr_mask = 0xffffff00,
943 .pvr_value = 0x00201400,
944 .cpu_name = "403GCX",
Kumar Gala10b35d92005-09-23 14:08:58 -0500945 .cpu_features = CPU_FTRS_40X,
Paul Mackerras98599012005-10-22 16:51:34 +1000946 .cpu_user_features = PPC_FEATURE_32 |
947 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700948 .icache_bsize = 16,
949 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100950 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700951 },
952 { /* 403G ?? */
953 .pvr_mask = 0xffff0000,
954 .pvr_value = 0x00200000,
955 .cpu_name = "403G ??",
Kumar Gala10b35d92005-09-23 14:08:58 -0500956 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700957 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
958 .icache_bsize = 16,
959 .dcache_bsize = 16,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100960 .platform = "ppc403",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700961 },
962 { /* 405GP */
963 .pvr_mask = 0xffff0000,
964 .pvr_value = 0x40110000,
965 .cpu_name = "405GP",
Kumar Gala10b35d92005-09-23 14:08:58 -0500966 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700967 .cpu_user_features = PPC_FEATURE_32 |
968 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
969 .icache_bsize = 32,
970 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100971 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700972 },
973 { /* STB 03xxx */
974 .pvr_mask = 0xffff0000,
975 .pvr_value = 0x40130000,
976 .cpu_name = "STB03xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500977 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700978 .cpu_user_features = PPC_FEATURE_32 |
979 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
980 .icache_bsize = 32,
981 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100982 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700983 },
984 { /* STB 04xxx */
985 .pvr_mask = 0xffff0000,
986 .pvr_value = 0x41810000,
987 .cpu_name = "STB04xxx",
Kumar Gala10b35d92005-09-23 14:08:58 -0500988 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700989 .cpu_user_features = PPC_FEATURE_32 |
990 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
991 .icache_bsize = 32,
992 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +1100993 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994 },
995 { /* NP405L */
996 .pvr_mask = 0xffff0000,
997 .pvr_value = 0x41610000,
998 .cpu_name = "NP405L",
Kumar Gala10b35d92005-09-23 14:08:58 -0500999 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001000 .cpu_user_features = PPC_FEATURE_32 |
1001 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1002 .icache_bsize = 32,
1003 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001004 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001005 },
1006 { /* NP4GS3 */
1007 .pvr_mask = 0xffff0000,
1008 .pvr_value = 0x40B10000,
1009 .cpu_name = "NP4GS3",
Kumar Gala10b35d92005-09-23 14:08:58 -05001010 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001011 .cpu_user_features = PPC_FEATURE_32 |
1012 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1013 .icache_bsize = 32,
1014 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001015 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001016 },
1017 { /* NP405H */
1018 .pvr_mask = 0xffff0000,
1019 .pvr_value = 0x41410000,
1020 .cpu_name = "NP405H",
Kumar Gala10b35d92005-09-23 14:08:58 -05001021 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001022 .cpu_user_features = PPC_FEATURE_32 |
1023 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1024 .icache_bsize = 32,
1025 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001026 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001027 },
1028 { /* 405GPr */
1029 .pvr_mask = 0xffff0000,
1030 .pvr_value = 0x50910000,
1031 .cpu_name = "405GPr",
Kumar Gala10b35d92005-09-23 14:08:58 -05001032 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001033 .cpu_user_features = PPC_FEATURE_32 |
1034 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1035 .icache_bsize = 32,
1036 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001037 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001038 },
1039 { /* STBx25xx */
1040 .pvr_mask = 0xffff0000,
1041 .pvr_value = 0x51510000,
1042 .cpu_name = "STBx25xx",
Kumar Gala10b35d92005-09-23 14:08:58 -05001043 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001044 .cpu_user_features = PPC_FEATURE_32 |
1045 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1046 .icache_bsize = 32,
1047 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001048 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001049 },
1050 { /* 405LP */
1051 .pvr_mask = 0xffff0000,
1052 .pvr_value = 0x41F10000,
1053 .cpu_name = "405LP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001054 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001055 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1056 .icache_bsize = 32,
1057 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001058 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001059 },
1060 { /* Xilinx Virtex-II Pro */
Grant C. Likely72646c72006-01-19 01:13:20 -07001061 .pvr_mask = 0xfffff000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001062 .pvr_value = 0x20010000,
1063 .cpu_name = "Virtex-II Pro",
Kumar Gala10b35d92005-09-23 14:08:58 -05001064 .cpu_features = CPU_FTRS_40X,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001065 .cpu_user_features = PPC_FEATURE_32 |
1066 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1067 .icache_bsize = 32,
1068 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001069 .platform = "ppc405",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001070 },
Grant C. Likely72646c72006-01-19 01:13:20 -07001071 { /* Xilinx Virtex-4 FX */
1072 .pvr_mask = 0xfffff000,
1073 .pvr_value = 0x20011000,
1074 .cpu_name = "Virtex-4 FX",
1075 .cpu_features = CPU_FTRS_40X,
1076 .cpu_user_features = PPC_FEATURE_32 |
1077 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1078 .icache_bsize = 32,
1079 .dcache_bsize = 32,
Peter Bergner838fdb42006-09-14 14:18:38 -05001080 .platform = "ppc405",
Grant C. Likely72646c72006-01-19 01:13:20 -07001081 },
Eugene Suroveginad95d602005-06-07 13:22:09 -07001082 { /* 405EP */
1083 .pvr_mask = 0xffff0000,
1084 .pvr_value = 0x51210000,
1085 .cpu_name = "405EP",
Kumar Gala10b35d92005-09-23 14:08:58 -05001086 .cpu_features = CPU_FTRS_40X,
Eugene Suroveginad95d602005-06-07 13:22:09 -07001087 .cpu_user_features = PPC_FEATURE_32 |
1088 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1089 .icache_bsize = 32,
1090 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001091 .platform = "ppc405",
Eugene Suroveginad95d602005-06-07 13:22:09 -07001092 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001093
1094#endif /* CONFIG_40x */
1095#ifdef CONFIG_44x
Matt Porterc9cf73a2005-07-31 22:34:52 -07001096 {
1097 .pvr_mask = 0xf0000fff,
1098 .pvr_value = 0x40000850,
1099 .cpu_name = "440EP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001100 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001101 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001102 .icache_bsize = 32,
1103 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001104 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001105 },
1106 {
1107 .pvr_mask = 0xf0000fff,
1108 .pvr_value = 0x400008d3,
1109 .cpu_name = "440EP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001110 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001111 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
Matt Porterc9cf73a2005-07-31 22:34:52 -07001112 .icache_bsize = 32,
1113 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001114 .platform = "ppc440",
Matt Porterc9cf73a2005-07-31 22:34:52 -07001115 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001116 { /* 440GP Rev. B */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001117 .pvr_mask = 0xf0000fff,
1118 .pvr_value = 0x40000440,
1119 .cpu_name = "440GP Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001120 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001121 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001122 .icache_bsize = 32,
1123 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001124 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001125 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001126 { /* 440GP Rev. C */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001127 .pvr_mask = 0xf0000fff,
1128 .pvr_value = 0x40000481,
1129 .cpu_name = "440GP Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001130 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001131 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001132 .icache_bsize = 32,
1133 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001134 .platform = "ppc440gp",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001135 },
1136 { /* 440GX Rev. A */
1137 .pvr_mask = 0xf0000fff,
1138 .pvr_value = 0x50000850,
1139 .cpu_name = "440GX Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001140 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001141 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001142 .icache_bsize = 32,
1143 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001144 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001145 },
1146 { /* 440GX Rev. B */
1147 .pvr_mask = 0xf0000fff,
1148 .pvr_value = 0x50000851,
1149 .cpu_name = "440GX Rev. B",
Kumar Gala10b35d92005-09-23 14:08:58 -05001150 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001151 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001152 .icache_bsize = 32,
1153 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001154 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001155 },
1156 { /* 440GX Rev. C */
1157 .pvr_mask = 0xf0000fff,
1158 .pvr_value = 0x50000892,
1159 .cpu_name = "440GX Rev. C",
Kumar Gala10b35d92005-09-23 14:08:58 -05001160 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001161 .cpu_user_features = COMMON_USER_BOOKE,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001162 .icache_bsize = 32,
1163 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001164 .platform = "ppc440",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001165 },
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001166 { /* 440GX Rev. F */
1167 .pvr_mask = 0xf0000fff,
1168 .pvr_value = 0x50000894,
1169 .cpu_name = "440GX Rev. F",
Kumar Gala10b35d92005-09-23 14:08:58 -05001170 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001171 .cpu_user_features = COMMON_USER_BOOKE,
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001172 .icache_bsize = 32,
1173 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001174 .platform = "ppc440",
Eugene Surovegin9149fb32005-09-03 15:55:40 -07001175 },
Matt Porter656de7e2005-09-03 15:55:42 -07001176 { /* 440SP Rev. A */
1177 .pvr_mask = 0xff000fff,
1178 .pvr_value = 0x53000891,
1179 .cpu_name = "440SP Rev. A",
Kumar Gala10b35d92005-09-23 14:08:58 -05001180 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001181 .cpu_user_features = COMMON_USER_BOOKE,
Matt Porter656de7e2005-09-03 15:55:42 -07001182 .icache_bsize = 32,
1183 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001184 .platform = "ppc440",
Matt Porter656de7e2005-09-03 15:55:42 -07001185 },
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001186 { /* 440SPe Rev. A */
1187 .pvr_mask = 0xff000fff,
1188 .pvr_value = 0x53000890,
1189 .cpu_name = "440SPe Rev. A",
Kumar Galaa147c582006-12-08 02:34:38 -06001190 .cpu_features = CPU_FTRS_44X,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001191 .cpu_user_features = COMMON_USER_BOOKE,
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001192 .icache_bsize = 32,
1193 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001194 .platform = "ppc440",
Roland Dreierb0f7b8b2005-11-07 00:58:13 -08001195 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001196#endif /* CONFIG_44x */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001197#ifdef CONFIG_FSL_BOOKE
Stephen Rothwell49209602005-10-12 15:55:09 +10001198 { /* e200z5 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001199 .pvr_mask = 0xfff00000,
1200 .pvr_value = 0x81000000,
1201 .cpu_name = "e200z5",
1202 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001203 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001204 .cpu_user_features = COMMON_USER_BOOKE |
1205 PPC_FEATURE_HAS_EFP_SINGLE |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001206 PPC_FEATURE_UNIFIED_CACHE,
1207 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001208 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001209 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001210 { /* e200z6 */
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001211 .pvr_mask = 0xfff00000,
1212 .pvr_value = 0x81100000,
1213 .cpu_name = "e200z6",
1214 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001215 .cpu_features = CPU_FTRS_E200,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001216 .cpu_user_features = COMMON_USER_BOOKE |
1217 PPC_FEATURE_SPE_COMP |
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001218 PPC_FEATURE_HAS_EFP_SINGLE |
1219 PPC_FEATURE_UNIFIED_CACHE,
1220 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001221 .platform = "ppc5554",
Kumar Gala33d9e9b2005-06-25 14:54:37 -07001222 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001223 { /* e500 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001224 .pvr_mask = 0xffff0000,
1225 .pvr_value = 0x80200000,
1226 .cpu_name = "e500",
1227 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001228 .cpu_features = CPU_FTRS_E500,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001229 .cpu_user_features = COMMON_USER_BOOKE |
1230 PPC_FEATURE_SPE_COMP |
Linus Torvalds1da177e2005-04-16 15:20:36 -07001231 PPC_FEATURE_HAS_EFP_SINGLE,
1232 .icache_bsize = 32,
1233 .dcache_bsize = 32,
1234 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001235 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001236 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001237 .platform = "ppc8540",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001238 },
Stephen Rothwell49209602005-10-12 15:55:09 +10001239 { /* e500v2 */
Kumar Gala5b37b702005-06-21 17:15:18 -07001240 .pvr_mask = 0xffff0000,
1241 .pvr_value = 0x80210000,
1242 .cpu_name = "e500v2",
1243 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
Kumar Gala10b35d92005-09-23 14:08:58 -05001244 .cpu_features = CPU_FTRS_E500_2,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001245 .cpu_user_features = COMMON_USER_BOOKE |
1246 PPC_FEATURE_SPE_COMP |
1247 PPC_FEATURE_HAS_EFP_SINGLE |
1248 PPC_FEATURE_HAS_EFP_DOUBLE,
Kumar Gala5b37b702005-06-21 17:15:18 -07001249 .icache_bsize = 32,
1250 .dcache_bsize = 32,
1251 .num_pmcs = 4,
Andy Fleming555d97a2005-12-15 20:02:04 -06001252 .oprofile_cpu_type = "ppc/e500",
Andy Whitcroft7a45fb12006-01-13 12:35:49 +00001253 .oprofile_type = PPC_OPROFILE_BOOKE,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001254 .platform = "ppc8548",
Kumar Gala5b37b702005-06-21 17:15:18 -07001255 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001256#endif
1257#if !CLASSIC_PPC
1258 { /* default match */
1259 .pvr_mask = 0x00000000,
1260 .pvr_value = 0x00000000,
1261 .cpu_name = "(generic PPC)",
Kumar Gala10b35d92005-09-23 14:08:58 -05001262 .cpu_features = CPU_FTRS_GENERIC_32,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001263 .cpu_user_features = PPC_FEATURE_32,
1264 .icache_bsize = 32,
1265 .dcache_bsize = 32,
Paul Mackerras80f15dc2006-01-14 10:11:39 +11001266 .platform = "powerpc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001267 }
1268#endif /* !CLASSIC_PPC */
Stephen Rothwell49209602005-10-12 15:55:09 +10001269#endif /* CONFIG_PPC32 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001270};
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001271
Paul Mackerras974a76f2006-11-10 20:38:53 +11001272struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001273{
1274 struct cpu_spec *s = cpu_specs;
1275 struct cpu_spec **cur = &cur_cpu_spec;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001276 int i;
1277
1278 s = PTRRELOC(s);
1279 cur = PTRRELOC(cur);
1280
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001281 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1282 if ((pvr & s->pvr_mask) == s->pvr_value) {
1283 *cur = cpu_specs + i;
1284#ifdef CONFIG_PPC64
1285 /* ppc64 expects identify_cpu to also call setup_cpu
1286 * for that processor. I will consolidate that at a
1287 * later time, for now, just use our friend #ifdef.
1288 * we also don't need to PTRRELOC the function pointer
1289 * on ppc64 as we are running at 0 in real mode.
1290 */
1291 if (s->cpu_setup) {
1292 s->cpu_setup(offset, s);
1293 }
1294#endif /* CONFIG_PPC64 */
1295 return s;
1296 }
1297 BUG();
1298 return NULL;
1299}
1300
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001301void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001302{
1303 struct fixup_entry {
1304 unsigned long mask;
1305 unsigned long value;
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001306 long start_off;
1307 long end_off;
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001308 } *fcur, *fend;
1309
1310 fcur = fixup_start;
1311 fend = fixup_end;
1312
1313 for (; fcur < fend; fcur++) {
1314 unsigned int *pstart, *pend, *p;
1315
1316 if ((value & fcur->mask) == fcur->value)
1317 continue;
1318
1319 /* These PTRRELOCs will disappear once the new scheme for
1320 * modules and vdso is implemented
1321 */
Benjamin Herrenschmidt0909c8c2006-10-20 11:47:18 +10001322 pstart = ((unsigned int *)fcur) + (fcur->start_off / 4);
1323 pend = ((unsigned int *)fcur) + (fcur->end_off / 4);
Benjamin Herrenschmidt42c4aaa2006-10-24 16:42:40 +10001324
1325 for (p = pstart; p < pend; p++) {
1326 *p = 0x60000000u;
1327 asm volatile ("dcbst 0, %0" : : "r" (p));
1328 }
1329 asm volatile ("sync" : : : "memory");
1330 for (p = pstart; p < pend; p++)
1331 asm volatile ("icbi 0,%0" : : "r" (p));
1332 asm volatile ("sync; isync" : : : "memory");
1333 }
1334}