Merge branch 'linus' into x86/kprobes
[linux-2.6] / arch / powerpc / kernel / cputable.c
1 /*
2  *  Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
3  *
4  *  Modifications for ppc64:
5  *      Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
6  *
7  *  This program is free software; you can redistribute it and/or
8  *  modify it under the terms of the GNU General Public License
9  *  as published by the Free Software Foundation; either version
10  *  2 of the License, or (at your option) any later version.
11  */
12
13 #include <linux/string.h>
14 #include <linux/sched.h>
15 #include <linux/threads.h>
16 #include <linux/init.h>
17 #include <linux/module.h>
18
19 #include <asm/oprofile_impl.h>
20 #include <asm/cputable.h>
21 #include <asm/prom.h>           /* for PTRRELOC on ARCH=ppc */
22
23 struct cpu_spec* cur_cpu_spec = NULL;
24 EXPORT_SYMBOL(cur_cpu_spec);
25
26 /* 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  */
33 #ifdef CONFIG_PPC32
34 extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35 extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36 extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
37 extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
38 extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
39 extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
40 extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
41 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
42 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
43 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
44 extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
45 extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
46 extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
47 extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
48 extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
49 #endif /* CONFIG_PPC32 */
50 #ifdef CONFIG_PPC64
51 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
52 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
53 extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
54 extern void __restore_cpu_pa6t(void);
55 extern void __restore_cpu_ppc970(void);
56 extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
57 extern void __restore_cpu_power7(void);
58 #endif /* CONFIG_PPC64 */
59
60 /* This table only contains "desktop" CPUs, it need to be filled with embedded
61  * ones as well...
62  */
63 #define COMMON_USER             (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
64                                  PPC_FEATURE_HAS_MMU)
65 #define COMMON_USER_PPC64       (COMMON_USER | PPC_FEATURE_64)
66 #define COMMON_USER_POWER4      (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
67 #define COMMON_USER_POWER5      (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
68                                  PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
69 #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
70                                  PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
71 #define COMMON_USER_POWER6      (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
72                                  PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
73                                  PPC_FEATURE_TRUE_LE | \
74                                  PPC_FEATURE_PSERIES_PERFMON_COMPAT)
75 #define COMMON_USER_POWER7      (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
76                                  PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
77                                  PPC_FEATURE_TRUE_LE | \
78                                  PPC_FEATURE_PSERIES_PERFMON_COMPAT)
79 #define COMMON_USER_PA6T        (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
80                                  PPC_FEATURE_TRUE_LE | \
81                                  PPC_FEATURE_HAS_ALTIVEC_COMP)
82 #define COMMON_USER_BOOKE       (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
83                                  PPC_FEATURE_BOOKE)
84
85 static struct cpu_spec __initdata cpu_specs[] = {
86 #ifdef CONFIG_PPC64
87         {       /* Power3 */
88                 .pvr_mask               = 0xffff0000,
89                 .pvr_value              = 0x00400000,
90                 .cpu_name               = "POWER3 (630)",
91                 .cpu_features           = CPU_FTRS_POWER3,
92                 .cpu_user_features      = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
93                 .icache_bsize           = 128,
94                 .dcache_bsize           = 128,
95                 .num_pmcs               = 8,
96                 .pmc_type               = PPC_PMC_IBM,
97                 .oprofile_cpu_type      = "ppc64/power3",
98                 .oprofile_type          = PPC_OPROFILE_RS64,
99                 .machine_check          = machine_check_generic,
100                 .platform               = "power3",
101         },
102         {       /* Power3+ */
103                 .pvr_mask               = 0xffff0000,
104                 .pvr_value              = 0x00410000,
105                 .cpu_name               = "POWER3 (630+)",
106                 .cpu_features           = CPU_FTRS_POWER3,
107                 .cpu_user_features      = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
108                 .icache_bsize           = 128,
109                 .dcache_bsize           = 128,
110                 .num_pmcs               = 8,
111                 .pmc_type               = PPC_PMC_IBM,
112                 .oprofile_cpu_type      = "ppc64/power3",
113                 .oprofile_type          = PPC_OPROFILE_RS64,
114                 .machine_check          = machine_check_generic,
115                 .platform               = "power3",
116         },
117         {       /* Northstar */
118                 .pvr_mask               = 0xffff0000,
119                 .pvr_value              = 0x00330000,
120                 .cpu_name               = "RS64-II (northstar)",
121                 .cpu_features           = CPU_FTRS_RS64,
122                 .cpu_user_features      = COMMON_USER_PPC64,
123                 .icache_bsize           = 128,
124                 .dcache_bsize           = 128,
125                 .num_pmcs               = 8,
126                 .pmc_type               = PPC_PMC_IBM,
127                 .oprofile_cpu_type      = "ppc64/rs64",
128                 .oprofile_type          = PPC_OPROFILE_RS64,
129                 .machine_check          = machine_check_generic,
130                 .platform               = "rs64",
131         },
132         {       /* Pulsar */
133                 .pvr_mask               = 0xffff0000,
134                 .pvr_value              = 0x00340000,
135                 .cpu_name               = "RS64-III (pulsar)",
136                 .cpu_features           = CPU_FTRS_RS64,
137                 .cpu_user_features      = COMMON_USER_PPC64,
138                 .icache_bsize           = 128,
139                 .dcache_bsize           = 128,
140                 .num_pmcs               = 8,
141                 .pmc_type               = PPC_PMC_IBM,
142                 .oprofile_cpu_type      = "ppc64/rs64",
143                 .oprofile_type          = PPC_OPROFILE_RS64,
144                 .machine_check          = machine_check_generic,
145                 .platform               = "rs64",
146         },
147         {       /* I-star */
148                 .pvr_mask               = 0xffff0000,
149                 .pvr_value              = 0x00360000,
150                 .cpu_name               = "RS64-III (icestar)",
151                 .cpu_features           = CPU_FTRS_RS64,
152                 .cpu_user_features      = COMMON_USER_PPC64,
153                 .icache_bsize           = 128,
154                 .dcache_bsize           = 128,
155                 .num_pmcs               = 8,
156                 .pmc_type               = PPC_PMC_IBM,
157                 .oprofile_cpu_type      = "ppc64/rs64",
158                 .oprofile_type          = PPC_OPROFILE_RS64,
159                 .machine_check          = machine_check_generic,
160                 .platform               = "rs64",
161         },
162         {       /* S-star */
163                 .pvr_mask               = 0xffff0000,
164                 .pvr_value              = 0x00370000,
165                 .cpu_name               = "RS64-IV (sstar)",
166                 .cpu_features           = CPU_FTRS_RS64,
167                 .cpu_user_features      = COMMON_USER_PPC64,
168                 .icache_bsize           = 128,
169                 .dcache_bsize           = 128,
170                 .num_pmcs               = 8,
171                 .pmc_type               = PPC_PMC_IBM,
172                 .oprofile_cpu_type      = "ppc64/rs64",
173                 .oprofile_type          = PPC_OPROFILE_RS64,
174                 .machine_check          = machine_check_generic,
175                 .platform               = "rs64",
176         },
177         {       /* Power4 */
178                 .pvr_mask               = 0xffff0000,
179                 .pvr_value              = 0x00350000,
180                 .cpu_name               = "POWER4 (gp)",
181                 .cpu_features           = CPU_FTRS_POWER4,
182                 .cpu_user_features      = COMMON_USER_POWER4,
183                 .icache_bsize           = 128,
184                 .dcache_bsize           = 128,
185                 .num_pmcs               = 8,
186                 .pmc_type               = PPC_PMC_IBM,
187                 .oprofile_cpu_type      = "ppc64/power4",
188                 .oprofile_type          = PPC_OPROFILE_POWER4,
189                 .machine_check          = machine_check_generic,
190                 .platform               = "power4",
191         },
192         {       /* Power4+ */
193                 .pvr_mask               = 0xffff0000,
194                 .pvr_value              = 0x00380000,
195                 .cpu_name               = "POWER4+ (gq)",
196                 .cpu_features           = CPU_FTRS_POWER4,
197                 .cpu_user_features      = COMMON_USER_POWER4,
198                 .icache_bsize           = 128,
199                 .dcache_bsize           = 128,
200                 .num_pmcs               = 8,
201                 .pmc_type               = PPC_PMC_IBM,
202                 .oprofile_cpu_type      = "ppc64/power4",
203                 .oprofile_type          = PPC_OPROFILE_POWER4,
204                 .machine_check          = machine_check_generic,
205                 .platform               = "power4",
206         },
207         {       /* PPC970 */
208                 .pvr_mask               = 0xffff0000,
209                 .pvr_value              = 0x00390000,
210                 .cpu_name               = "PPC970",
211                 .cpu_features           = CPU_FTRS_PPC970,
212                 .cpu_user_features      = COMMON_USER_POWER4 |
213                         PPC_FEATURE_HAS_ALTIVEC_COMP,
214                 .icache_bsize           = 128,
215                 .dcache_bsize           = 128,
216                 .num_pmcs               = 8,
217                 .pmc_type               = PPC_PMC_IBM,
218                 .cpu_setup              = __setup_cpu_ppc970,
219                 .cpu_restore            = __restore_cpu_ppc970,
220                 .oprofile_cpu_type      = "ppc64/970",
221                 .oprofile_type          = PPC_OPROFILE_POWER4,
222                 .machine_check          = machine_check_generic,
223                 .platform               = "ppc970",
224         },
225         {       /* PPC970FX */
226                 .pvr_mask               = 0xffff0000,
227                 .pvr_value              = 0x003c0000,
228                 .cpu_name               = "PPC970FX",
229                 .cpu_features           = CPU_FTRS_PPC970,
230                 .cpu_user_features      = COMMON_USER_POWER4 |
231                         PPC_FEATURE_HAS_ALTIVEC_COMP,
232                 .icache_bsize           = 128,
233                 .dcache_bsize           = 128,
234                 .num_pmcs               = 8,
235                 .pmc_type               = PPC_PMC_IBM,
236                 .cpu_setup              = __setup_cpu_ppc970,
237                 .cpu_restore            = __restore_cpu_ppc970,
238                 .oprofile_cpu_type      = "ppc64/970",
239                 .oprofile_type          = PPC_OPROFILE_POWER4,
240                 .machine_check          = machine_check_generic,
241                 .platform               = "ppc970",
242         },
243         {       /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
244                 .pvr_mask               = 0xffffffff,
245                 .pvr_value              = 0x00440100,
246                 .cpu_name               = "PPC970MP",
247                 .cpu_features           = CPU_FTRS_PPC970,
248                 .cpu_user_features      = COMMON_USER_POWER4 |
249                         PPC_FEATURE_HAS_ALTIVEC_COMP,
250                 .icache_bsize           = 128,
251                 .dcache_bsize           = 128,
252                 .num_pmcs               = 8,
253                 .pmc_type               = PPC_PMC_IBM,
254                 .cpu_setup              = __setup_cpu_ppc970,
255                 .cpu_restore            = __restore_cpu_ppc970,
256                 .oprofile_cpu_type      = "ppc64/970MP",
257                 .oprofile_type          = PPC_OPROFILE_POWER4,
258                 .machine_check          = machine_check_generic,
259                 .platform               = "ppc970",
260         },
261         {       /* PPC970MP */
262                 .pvr_mask               = 0xffff0000,
263                 .pvr_value              = 0x00440000,
264                 .cpu_name               = "PPC970MP",
265                 .cpu_features           = CPU_FTRS_PPC970,
266                 .cpu_user_features      = COMMON_USER_POWER4 |
267                         PPC_FEATURE_HAS_ALTIVEC_COMP,
268                 .icache_bsize           = 128,
269                 .dcache_bsize           = 128,
270                 .num_pmcs               = 8,
271                 .pmc_type               = PPC_PMC_IBM,
272                 .cpu_setup              = __setup_cpu_ppc970MP,
273                 .cpu_restore            = __restore_cpu_ppc970,
274                 .oprofile_cpu_type      = "ppc64/970MP",
275                 .oprofile_type          = PPC_OPROFILE_POWER4,
276                 .machine_check          = machine_check_generic,
277                 .platform               = "ppc970",
278         },
279         {       /* PPC970GX */
280                 .pvr_mask               = 0xffff0000,
281                 .pvr_value              = 0x00450000,
282                 .cpu_name               = "PPC970GX",
283                 .cpu_features           = CPU_FTRS_PPC970,
284                 .cpu_user_features      = COMMON_USER_POWER4 |
285                         PPC_FEATURE_HAS_ALTIVEC_COMP,
286                 .icache_bsize           = 128,
287                 .dcache_bsize           = 128,
288                 .num_pmcs               = 8,
289                 .pmc_type               = PPC_PMC_IBM,
290                 .cpu_setup              = __setup_cpu_ppc970,
291                 .oprofile_cpu_type      = "ppc64/970",
292                 .oprofile_type          = PPC_OPROFILE_POWER4,
293                 .machine_check          = machine_check_generic,
294                 .platform               = "ppc970",
295         },
296         {       /* Power5 GR */
297                 .pvr_mask               = 0xffff0000,
298                 .pvr_value              = 0x003a0000,
299                 .cpu_name               = "POWER5 (gr)",
300                 .cpu_features           = CPU_FTRS_POWER5,
301                 .cpu_user_features      = COMMON_USER_POWER5,
302                 .icache_bsize           = 128,
303                 .dcache_bsize           = 128,
304                 .num_pmcs               = 6,
305                 .pmc_type               = PPC_PMC_IBM,
306                 .oprofile_cpu_type      = "ppc64/power5",
307                 .oprofile_type          = PPC_OPROFILE_POWER4,
308                 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
309                  * and above but only works on POWER5 and above
310                  */
311                 .oprofile_mmcra_sihv    = MMCRA_SIHV,
312                 .oprofile_mmcra_sipr    = MMCRA_SIPR,
313                 .machine_check          = machine_check_generic,
314                 .platform               = "power5",
315         },
316         {       /* Power5++ */
317                 .pvr_mask               = 0xffffff00,
318                 .pvr_value              = 0x003b0300,
319                 .cpu_name               = "POWER5+ (gs)",
320                 .cpu_features           = CPU_FTRS_POWER5,
321                 .cpu_user_features      = COMMON_USER_POWER5_PLUS,
322                 .icache_bsize           = 128,
323                 .dcache_bsize           = 128,
324                 .num_pmcs               = 6,
325                 .oprofile_cpu_type      = "ppc64/power5++",
326                 .oprofile_type          = PPC_OPROFILE_POWER4,
327                 .oprofile_mmcra_sihv    = MMCRA_SIHV,
328                 .oprofile_mmcra_sipr    = MMCRA_SIPR,
329                 .machine_check          = machine_check_generic,
330                 .platform               = "power5+",
331         },
332         {       /* Power5 GS */
333                 .pvr_mask               = 0xffff0000,
334                 .pvr_value              = 0x003b0000,
335                 .cpu_name               = "POWER5+ (gs)",
336                 .cpu_features           = CPU_FTRS_POWER5,
337                 .cpu_user_features      = COMMON_USER_POWER5_PLUS,
338                 .icache_bsize           = 128,
339                 .dcache_bsize           = 128,
340                 .num_pmcs               = 6,
341                 .pmc_type               = PPC_PMC_IBM,
342                 .oprofile_cpu_type      = "ppc64/power5+",
343                 .oprofile_type          = PPC_OPROFILE_POWER4,
344                 .oprofile_mmcra_sihv    = MMCRA_SIHV,
345                 .oprofile_mmcra_sipr    = MMCRA_SIPR,
346                 .machine_check          = machine_check_generic,
347                 .platform               = "power5+",
348         },
349         {       /* POWER6 in P5+ mode; 2.04-compliant processor */
350                 .pvr_mask               = 0xffffffff,
351                 .pvr_value              = 0x0f000001,
352                 .cpu_name               = "POWER5+",
353                 .cpu_features           = CPU_FTRS_POWER5,
354                 .cpu_user_features      = COMMON_USER_POWER5_PLUS,
355                 .icache_bsize           = 128,
356                 .dcache_bsize           = 128,
357                 .machine_check          = machine_check_generic,
358                 .platform               = "power5+",
359         },
360         {       /* Power6 */
361                 .pvr_mask               = 0xffff0000,
362                 .pvr_value              = 0x003e0000,
363                 .cpu_name               = "POWER6 (raw)",
364                 .cpu_features           = CPU_FTRS_POWER6,
365                 .cpu_user_features      = COMMON_USER_POWER6 |
366                         PPC_FEATURE_POWER6_EXT,
367                 .icache_bsize           = 128,
368                 .dcache_bsize           = 128,
369                 .num_pmcs               = 6,
370                 .pmc_type               = PPC_PMC_IBM,
371                 .oprofile_cpu_type      = "ppc64/power6",
372                 .oprofile_type          = PPC_OPROFILE_POWER4,
373                 .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
374                 .oprofile_mmcra_sipr    = POWER6_MMCRA_SIPR,
375                 .oprofile_mmcra_clear   = POWER6_MMCRA_THRM |
376                         POWER6_MMCRA_OTHER,
377                 .machine_check          = machine_check_generic,
378                 .platform               = "power6x",
379         },
380         {       /* 2.05-compliant processor, i.e. Power6 "architected" mode */
381                 .pvr_mask               = 0xffffffff,
382                 .pvr_value              = 0x0f000002,
383                 .cpu_name               = "POWER6 (architected)",
384                 .cpu_features           = CPU_FTRS_POWER6,
385                 .cpu_user_features      = COMMON_USER_POWER6,
386                 .icache_bsize           = 128,
387                 .dcache_bsize           = 128,
388                 .machine_check          = machine_check_generic,
389                 .platform               = "power6",
390         },
391         {       /* 2.06-compliant processor, i.e. Power7 "architected" mode */
392                 .pvr_mask               = 0xffffffff,
393                 .pvr_value              = 0x0f000003,
394                 .cpu_name               = "POWER7 (architected)",
395                 .cpu_features           = CPU_FTRS_POWER7,
396                 .cpu_user_features      = COMMON_USER_POWER7,
397                 .icache_bsize           = 128,
398                 .dcache_bsize           = 128,
399                 .machine_check          = machine_check_generic,
400                 .platform               = "power7",
401         },
402         {       /* Power7 */
403                 .pvr_mask               = 0xffff0000,
404                 .pvr_value              = 0x003f0000,
405                 .cpu_name               = "POWER7 (raw)",
406                 .cpu_features           = CPU_FTRS_POWER7,
407                 .cpu_user_features      = COMMON_USER_POWER7,
408                 .icache_bsize           = 128,
409                 .dcache_bsize           = 128,
410                 .num_pmcs               = 6,
411                 .pmc_type               = PPC_PMC_IBM,
412                 .cpu_setup              = __setup_cpu_power7,
413                 .cpu_restore            = __restore_cpu_power7,
414                 .oprofile_cpu_type      = "ppc64/power7",
415                 .oprofile_type          = PPC_OPROFILE_POWER4,
416                 .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
417                 .oprofile_mmcra_sipr    = POWER6_MMCRA_SIPR,
418                 .oprofile_mmcra_clear   = POWER6_MMCRA_THRM |
419                         POWER6_MMCRA_OTHER,
420                 .platform               = "power7",
421         },
422         {       /* Cell Broadband Engine */
423                 .pvr_mask               = 0xffff0000,
424                 .pvr_value              = 0x00700000,
425                 .cpu_name               = "Cell Broadband Engine",
426                 .cpu_features           = CPU_FTRS_CELL,
427                 .cpu_user_features      = COMMON_USER_PPC64 |
428                         PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
429                         PPC_FEATURE_SMT,
430                 .icache_bsize           = 128,
431                 .dcache_bsize           = 128,
432                 .num_pmcs               = 4,
433                 .pmc_type               = PPC_PMC_IBM,
434                 .oprofile_cpu_type      = "ppc64/cell-be",
435                 .oprofile_type          = PPC_OPROFILE_CELL,
436                 .machine_check          = machine_check_generic,
437                 .platform               = "ppc-cell-be",
438         },
439         {       /* PA Semi PA6T */
440                 .pvr_mask               = 0x7fff0000,
441                 .pvr_value              = 0x00900000,
442                 .cpu_name               = "PA6T",
443                 .cpu_features           = CPU_FTRS_PA6T,
444                 .cpu_user_features      = COMMON_USER_PA6T,
445                 .icache_bsize           = 64,
446                 .dcache_bsize           = 64,
447                 .num_pmcs               = 6,
448                 .pmc_type               = PPC_PMC_PA6T,
449                 .cpu_setup              = __setup_cpu_pa6t,
450                 .cpu_restore            = __restore_cpu_pa6t,
451                 .oprofile_cpu_type      = "ppc64/pa6t",
452                 .oprofile_type          = PPC_OPROFILE_PA6T,
453                 .machine_check          = machine_check_generic,
454                 .platform               = "pa6t",
455         },
456         {       /* default match */
457                 .pvr_mask               = 0x00000000,
458                 .pvr_value              = 0x00000000,
459                 .cpu_name               = "POWER4 (compatible)",
460                 .cpu_features           = CPU_FTRS_COMPATIBLE,
461                 .cpu_user_features      = COMMON_USER_PPC64,
462                 .icache_bsize           = 128,
463                 .dcache_bsize           = 128,
464                 .num_pmcs               = 6,
465                 .pmc_type               = PPC_PMC_IBM,
466                 .machine_check          = machine_check_generic,
467                 .platform               = "power4",
468         }
469 #endif  /* CONFIG_PPC64 */
470 #ifdef CONFIG_PPC32
471 #if CLASSIC_PPC
472         {       /* 601 */
473                 .pvr_mask               = 0xffff0000,
474                 .pvr_value              = 0x00010000,
475                 .cpu_name               = "601",
476                 .cpu_features           = CPU_FTRS_PPC601,
477                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_601_INSTR |
478                         PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
479                 .icache_bsize           = 32,
480                 .dcache_bsize           = 32,
481                 .machine_check          = machine_check_generic,
482                 .platform               = "ppc601",
483         },
484         {       /* 603 */
485                 .pvr_mask               = 0xffff0000,
486                 .pvr_value              = 0x00030000,
487                 .cpu_name               = "603",
488                 .cpu_features           = CPU_FTRS_603,
489                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
490                 .icache_bsize           = 32,
491                 .dcache_bsize           = 32,
492                 .cpu_setup              = __setup_cpu_603,
493                 .machine_check          = machine_check_generic,
494                 .platform               = "ppc603",
495         },
496         {       /* 603e */
497                 .pvr_mask               = 0xffff0000,
498                 .pvr_value              = 0x00060000,
499                 .cpu_name               = "603e",
500                 .cpu_features           = CPU_FTRS_603,
501                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
502                 .icache_bsize           = 32,
503                 .dcache_bsize           = 32,
504                 .cpu_setup              = __setup_cpu_603,
505                 .machine_check          = machine_check_generic,
506                 .platform               = "ppc603",
507         },
508         {       /* 603ev */
509                 .pvr_mask               = 0xffff0000,
510                 .pvr_value              = 0x00070000,
511                 .cpu_name               = "603ev",
512                 .cpu_features           = CPU_FTRS_603,
513                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
514                 .icache_bsize           = 32,
515                 .dcache_bsize           = 32,
516                 .cpu_setup              = __setup_cpu_603,
517                 .machine_check          = machine_check_generic,
518                 .platform               = "ppc603",
519         },
520         {       /* 604 */
521                 .pvr_mask               = 0xffff0000,
522                 .pvr_value              = 0x00040000,
523                 .cpu_name               = "604",
524                 .cpu_features           = CPU_FTRS_604,
525                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
526                 .icache_bsize           = 32,
527                 .dcache_bsize           = 32,
528                 .num_pmcs               = 2,
529                 .cpu_setup              = __setup_cpu_604,
530                 .machine_check          = machine_check_generic,
531                 .platform               = "ppc604",
532         },
533         {       /* 604e */
534                 .pvr_mask               = 0xfffff000,
535                 .pvr_value              = 0x00090000,
536                 .cpu_name               = "604e",
537                 .cpu_features           = CPU_FTRS_604,
538                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
539                 .icache_bsize           = 32,
540                 .dcache_bsize           = 32,
541                 .num_pmcs               = 4,
542                 .cpu_setup              = __setup_cpu_604,
543                 .machine_check          = machine_check_generic,
544                 .platform               = "ppc604",
545         },
546         {       /* 604r */
547                 .pvr_mask               = 0xffff0000,
548                 .pvr_value              = 0x00090000,
549                 .cpu_name               = "604r",
550                 .cpu_features           = CPU_FTRS_604,
551                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
552                 .icache_bsize           = 32,
553                 .dcache_bsize           = 32,
554                 .num_pmcs               = 4,
555                 .cpu_setup              = __setup_cpu_604,
556                 .machine_check          = machine_check_generic,
557                 .platform               = "ppc604",
558         },
559         {       /* 604ev */
560                 .pvr_mask               = 0xffff0000,
561                 .pvr_value              = 0x000a0000,
562                 .cpu_name               = "604ev",
563                 .cpu_features           = CPU_FTRS_604,
564                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
565                 .icache_bsize           = 32,
566                 .dcache_bsize           = 32,
567                 .num_pmcs               = 4,
568                 .cpu_setup              = __setup_cpu_604,
569                 .machine_check          = machine_check_generic,
570                 .platform               = "ppc604",
571         },
572         {       /* 740/750 (0x4202, don't support TAU ?) */
573                 .pvr_mask               = 0xffffffff,
574                 .pvr_value              = 0x00084202,
575                 .cpu_name               = "740/750",
576                 .cpu_features           = CPU_FTRS_740_NOTAU,
577                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
578                 .icache_bsize           = 32,
579                 .dcache_bsize           = 32,
580                 .num_pmcs               = 4,
581                 .cpu_setup              = __setup_cpu_750,
582                 .machine_check          = machine_check_generic,
583                 .platform               = "ppc750",
584         },
585         {       /* 750CX (80100 and 8010x?) */
586                 .pvr_mask               = 0xfffffff0,
587                 .pvr_value              = 0x00080100,
588                 .cpu_name               = "750CX",
589                 .cpu_features           = CPU_FTRS_750,
590                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
591                 .icache_bsize           = 32,
592                 .dcache_bsize           = 32,
593                 .num_pmcs               = 4,
594                 .cpu_setup              = __setup_cpu_750cx,
595                 .machine_check          = machine_check_generic,
596                 .platform               = "ppc750",
597         },
598         {       /* 750CX (82201 and 82202) */
599                 .pvr_mask               = 0xfffffff0,
600                 .pvr_value              = 0x00082200,
601                 .cpu_name               = "750CX",
602                 .cpu_features           = CPU_FTRS_750,
603                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
604                 .icache_bsize           = 32,
605                 .dcache_bsize           = 32,
606                 .num_pmcs               = 4,
607                 .cpu_setup              = __setup_cpu_750cx,
608                 .machine_check          = machine_check_generic,
609                 .platform               = "ppc750",
610         },
611         {       /* 750CXe (82214) */
612                 .pvr_mask               = 0xfffffff0,
613                 .pvr_value              = 0x00082210,
614                 .cpu_name               = "750CXe",
615                 .cpu_features           = CPU_FTRS_750,
616                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
617                 .icache_bsize           = 32,
618                 .dcache_bsize           = 32,
619                 .num_pmcs               = 4,
620                 .cpu_setup              = __setup_cpu_750cx,
621                 .machine_check          = machine_check_generic,
622                 .platform               = "ppc750",
623         },
624         {       /* 750CXe "Gekko" (83214) */
625                 .pvr_mask               = 0xffffffff,
626                 .pvr_value              = 0x00083214,
627                 .cpu_name               = "750CXe",
628                 .cpu_features           = CPU_FTRS_750,
629                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
630                 .icache_bsize           = 32,
631                 .dcache_bsize           = 32,
632                 .num_pmcs               = 4,
633                 .cpu_setup              = __setup_cpu_750cx,
634                 .machine_check          = machine_check_generic,
635                 .platform               = "ppc750",
636         },
637         {       /* 750CL */
638                 .pvr_mask               = 0xfffff0f0,
639                 .pvr_value              = 0x00087010,
640                 .cpu_name               = "750CL",
641                 .cpu_features           = CPU_FTRS_750CL,
642                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
643                 .icache_bsize           = 32,
644                 .dcache_bsize           = 32,
645                 .num_pmcs               = 4,
646                 .cpu_setup              = __setup_cpu_750,
647                 .machine_check          = machine_check_generic,
648                 .platform               = "ppc750",
649         },
650         {       /* 745/755 */
651                 .pvr_mask               = 0xfffff000,
652                 .pvr_value              = 0x00083000,
653                 .cpu_name               = "745/755",
654                 .cpu_features           = CPU_FTRS_750,
655                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
656                 .icache_bsize           = 32,
657                 .dcache_bsize           = 32,
658                 .num_pmcs               = 4,
659                 .cpu_setup              = __setup_cpu_750,
660                 .machine_check          = machine_check_generic,
661                 .platform               = "ppc750",
662         },
663         {       /* 750FX rev 1.x */
664                 .pvr_mask               = 0xffffff00,
665                 .pvr_value              = 0x70000100,
666                 .cpu_name               = "750FX",
667                 .cpu_features           = CPU_FTRS_750FX1,
668                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
669                 .icache_bsize           = 32,
670                 .dcache_bsize           = 32,
671                 .num_pmcs               = 4,
672                 .cpu_setup              = __setup_cpu_750,
673                 .machine_check          = machine_check_generic,
674                 .platform               = "ppc750",
675         },
676         {       /* 750FX rev 2.0 must disable HID0[DPM] */
677                 .pvr_mask               = 0xffffffff,
678                 .pvr_value              = 0x70000200,
679                 .cpu_name               = "750FX",
680                 .cpu_features           = CPU_FTRS_750FX2,
681                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
682                 .icache_bsize           = 32,
683                 .dcache_bsize           = 32,
684                 .num_pmcs               = 4,
685                 .cpu_setup              = __setup_cpu_750,
686                 .machine_check          = machine_check_generic,
687                 .platform               = "ppc750",
688         },
689         {       /* 750FX (All revs except 2.0) */
690                 .pvr_mask               = 0xffff0000,
691                 .pvr_value              = 0x70000000,
692                 .cpu_name               = "750FX",
693                 .cpu_features           = CPU_FTRS_750FX,
694                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
695                 .icache_bsize           = 32,
696                 .dcache_bsize           = 32,
697                 .num_pmcs               = 4,
698                 .cpu_setup              = __setup_cpu_750fx,
699                 .machine_check          = machine_check_generic,
700                 .platform               = "ppc750",
701         },
702         {       /* 750GX */
703                 .pvr_mask               = 0xffff0000,
704                 .pvr_value              = 0x70020000,
705                 .cpu_name               = "750GX",
706                 .cpu_features           = CPU_FTRS_750GX,
707                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
708                 .icache_bsize           = 32,
709                 .dcache_bsize           = 32,
710                 .num_pmcs               = 4,
711                 .cpu_setup              = __setup_cpu_750fx,
712                 .machine_check          = machine_check_generic,
713                 .platform               = "ppc750",
714         },
715         {       /* 740/750 (L2CR bit need fixup for 740) */
716                 .pvr_mask               = 0xffff0000,
717                 .pvr_value              = 0x00080000,
718                 .cpu_name               = "740/750",
719                 .cpu_features           = CPU_FTRS_740,
720                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
721                 .icache_bsize           = 32,
722                 .dcache_bsize           = 32,
723                 .num_pmcs               = 4,
724                 .cpu_setup              = __setup_cpu_750,
725                 .machine_check          = machine_check_generic,
726                 .platform               = "ppc750",
727         },
728         {       /* 7400 rev 1.1 ? (no TAU) */
729                 .pvr_mask               = 0xffffffff,
730                 .pvr_value              = 0x000c1101,
731                 .cpu_name               = "7400 (1.1)",
732                 .cpu_features           = CPU_FTRS_7400_NOTAU,
733                 .cpu_user_features      = COMMON_USER |
734                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
735                 .icache_bsize           = 32,
736                 .dcache_bsize           = 32,
737                 .num_pmcs               = 4,
738                 .cpu_setup              = __setup_cpu_7400,
739                 .machine_check          = machine_check_generic,
740                 .platform               = "ppc7400",
741         },
742         {       /* 7400 */
743                 .pvr_mask               = 0xffff0000,
744                 .pvr_value              = 0x000c0000,
745                 .cpu_name               = "7400",
746                 .cpu_features           = CPU_FTRS_7400,
747                 .cpu_user_features      = COMMON_USER |
748                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
749                 .icache_bsize           = 32,
750                 .dcache_bsize           = 32,
751                 .num_pmcs               = 4,
752                 .cpu_setup              = __setup_cpu_7400,
753                 .machine_check          = machine_check_generic,
754                 .platform               = "ppc7400",
755         },
756         {       /* 7410 */
757                 .pvr_mask               = 0xffff0000,
758                 .pvr_value              = 0x800c0000,
759                 .cpu_name               = "7410",
760                 .cpu_features           = CPU_FTRS_7400,
761                 .cpu_user_features      = COMMON_USER |
762                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
763                 .icache_bsize           = 32,
764                 .dcache_bsize           = 32,
765                 .num_pmcs               = 4,
766                 .cpu_setup              = __setup_cpu_7410,
767                 .machine_check          = machine_check_generic,
768                 .platform               = "ppc7400",
769         },
770         {       /* 7450 2.0 - no doze/nap */
771                 .pvr_mask               = 0xffffffff,
772                 .pvr_value              = 0x80000200,
773                 .cpu_name               = "7450",
774                 .cpu_features           = CPU_FTRS_7450_20,
775                 .cpu_user_features      = COMMON_USER |
776                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
777                 .icache_bsize           = 32,
778                 .dcache_bsize           = 32,
779                 .num_pmcs               = 6,
780                 .cpu_setup              = __setup_cpu_745x,
781                 .oprofile_cpu_type      = "ppc/7450",
782                 .oprofile_type          = PPC_OPROFILE_G4,
783                 .machine_check          = machine_check_generic,
784                 .platform               = "ppc7450",
785         },
786         {       /* 7450 2.1 */
787                 .pvr_mask               = 0xffffffff,
788                 .pvr_value              = 0x80000201,
789                 .cpu_name               = "7450",
790                 .cpu_features           = CPU_FTRS_7450_21,
791                 .cpu_user_features      = COMMON_USER |
792                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
793                 .icache_bsize           = 32,
794                 .dcache_bsize           = 32,
795                 .num_pmcs               = 6,
796                 .cpu_setup              = __setup_cpu_745x,
797                 .oprofile_cpu_type      = "ppc/7450",
798                 .oprofile_type          = PPC_OPROFILE_G4,
799                 .machine_check          = machine_check_generic,
800                 .platform               = "ppc7450",
801         },
802         {       /* 7450 2.3 and newer */
803                 .pvr_mask               = 0xffff0000,
804                 .pvr_value              = 0x80000000,
805                 .cpu_name               = "7450",
806                 .cpu_features           = CPU_FTRS_7450_23,
807                 .cpu_user_features      = COMMON_USER |
808                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
809                 .icache_bsize           = 32,
810                 .dcache_bsize           = 32,
811                 .num_pmcs               = 6,
812                 .cpu_setup              = __setup_cpu_745x,
813                 .oprofile_cpu_type      = "ppc/7450",
814                 .oprofile_type          = PPC_OPROFILE_G4,
815                 .machine_check          = machine_check_generic,
816                 .platform               = "ppc7450",
817         },
818         {       /* 7455 rev 1.x */
819                 .pvr_mask               = 0xffffff00,
820                 .pvr_value              = 0x80010100,
821                 .cpu_name               = "7455",
822                 .cpu_features           = CPU_FTRS_7455_1,
823                 .cpu_user_features      = COMMON_USER |
824                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
825                 .icache_bsize           = 32,
826                 .dcache_bsize           = 32,
827                 .num_pmcs               = 6,
828                 .cpu_setup              = __setup_cpu_745x,
829                 .oprofile_cpu_type      = "ppc/7450",
830                 .oprofile_type          = PPC_OPROFILE_G4,
831                 .machine_check          = machine_check_generic,
832                 .platform               = "ppc7450",
833         },
834         {       /* 7455 rev 2.0 */
835                 .pvr_mask               = 0xffffffff,
836                 .pvr_value              = 0x80010200,
837                 .cpu_name               = "7455",
838                 .cpu_features           = CPU_FTRS_7455_20,
839                 .cpu_user_features      = COMMON_USER |
840                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
841                 .icache_bsize           = 32,
842                 .dcache_bsize           = 32,
843                 .num_pmcs               = 6,
844                 .cpu_setup              = __setup_cpu_745x,
845                 .oprofile_cpu_type      = "ppc/7450",
846                 .oprofile_type          = PPC_OPROFILE_G4,
847                 .machine_check          = machine_check_generic,
848                 .platform               = "ppc7450",
849         },
850         {       /* 7455 others */
851                 .pvr_mask               = 0xffff0000,
852                 .pvr_value              = 0x80010000,
853                 .cpu_name               = "7455",
854                 .cpu_features           = CPU_FTRS_7455,
855                 .cpu_user_features      = COMMON_USER |
856                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
857                 .icache_bsize           = 32,
858                 .dcache_bsize           = 32,
859                 .num_pmcs               = 6,
860                 .cpu_setup              = __setup_cpu_745x,
861                 .oprofile_cpu_type      = "ppc/7450",
862                 .oprofile_type          = PPC_OPROFILE_G4,
863                 .machine_check          = machine_check_generic,
864                 .platform               = "ppc7450",
865         },
866         {       /* 7447/7457 Rev 1.0 */
867                 .pvr_mask               = 0xffffffff,
868                 .pvr_value              = 0x80020100,
869                 .cpu_name               = "7447/7457",
870                 .cpu_features           = CPU_FTRS_7447_10,
871                 .cpu_user_features      = COMMON_USER |
872                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
873                 .icache_bsize           = 32,
874                 .dcache_bsize           = 32,
875                 .num_pmcs               = 6,
876                 .cpu_setup              = __setup_cpu_745x,
877                 .oprofile_cpu_type      = "ppc/7450",
878                 .oprofile_type          = PPC_OPROFILE_G4,
879                 .machine_check          = machine_check_generic,
880                 .platform               = "ppc7450",
881         },
882         {       /* 7447/7457 Rev 1.1 */
883                 .pvr_mask               = 0xffffffff,
884                 .pvr_value              = 0x80020101,
885                 .cpu_name               = "7447/7457",
886                 .cpu_features           = CPU_FTRS_7447_10,
887                 .cpu_user_features      = COMMON_USER |
888                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
889                 .icache_bsize           = 32,
890                 .dcache_bsize           = 32,
891                 .num_pmcs               = 6,
892                 .cpu_setup              = __setup_cpu_745x,
893                 .oprofile_cpu_type      = "ppc/7450",
894                 .oprofile_type          = PPC_OPROFILE_G4,
895                 .machine_check          = machine_check_generic,
896                 .platform               = "ppc7450",
897         },
898         {       /* 7447/7457 Rev 1.2 and later */
899                 .pvr_mask               = 0xffff0000,
900                 .pvr_value              = 0x80020000,
901                 .cpu_name               = "7447/7457",
902                 .cpu_features           = CPU_FTRS_7447,
903                 .cpu_user_features      = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
904                 .icache_bsize           = 32,
905                 .dcache_bsize           = 32,
906                 .num_pmcs               = 6,
907                 .cpu_setup              = __setup_cpu_745x,
908                 .oprofile_cpu_type      = "ppc/7450",
909                 .oprofile_type          = PPC_OPROFILE_G4,
910                 .machine_check          = machine_check_generic,
911                 .platform               = "ppc7450",
912         },
913         {       /* 7447A */
914                 .pvr_mask               = 0xffff0000,
915                 .pvr_value              = 0x80030000,
916                 .cpu_name               = "7447A",
917                 .cpu_features           = CPU_FTRS_7447A,
918                 .cpu_user_features      = COMMON_USER |
919                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
920                 .icache_bsize           = 32,
921                 .dcache_bsize           = 32,
922                 .num_pmcs               = 6,
923                 .cpu_setup              = __setup_cpu_745x,
924                 .oprofile_cpu_type      = "ppc/7450",
925                 .oprofile_type          = PPC_OPROFILE_G4,
926                 .machine_check          = machine_check_generic,
927                 .platform               = "ppc7450",
928         },
929         {       /* 7448 */
930                 .pvr_mask               = 0xffff0000,
931                 .pvr_value              = 0x80040000,
932                 .cpu_name               = "7448",
933                 .cpu_features           = CPU_FTRS_7448,
934                 .cpu_user_features      = COMMON_USER |
935                         PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
936                 .icache_bsize           = 32,
937                 .dcache_bsize           = 32,
938                 .num_pmcs               = 6,
939                 .cpu_setup              = __setup_cpu_745x,
940                 .oprofile_cpu_type      = "ppc/7450",
941                 .oprofile_type          = PPC_OPROFILE_G4,
942                 .machine_check          = machine_check_generic,
943                 .platform               = "ppc7450",
944         },
945         {       /* 82xx (8240, 8245, 8260 are all 603e cores) */
946                 .pvr_mask               = 0x7fff0000,
947                 .pvr_value              = 0x00810000,
948                 .cpu_name               = "82xx",
949                 .cpu_features           = CPU_FTRS_82XX,
950                 .cpu_user_features      = COMMON_USER,
951                 .icache_bsize           = 32,
952                 .dcache_bsize           = 32,
953                 .cpu_setup              = __setup_cpu_603,
954                 .machine_check          = machine_check_generic,
955                 .platform               = "ppc603",
956         },
957         {       /* All G2_LE (603e core, plus some) have the same pvr */
958                 .pvr_mask               = 0x7fff0000,
959                 .pvr_value              = 0x00820000,
960                 .cpu_name               = "G2_LE",
961                 .cpu_features           = CPU_FTRS_G2_LE,
962                 .cpu_user_features      = COMMON_USER,
963                 .icache_bsize           = 32,
964                 .dcache_bsize           = 32,
965                 .cpu_setup              = __setup_cpu_603,
966                 .machine_check          = machine_check_generic,
967                 .platform               = "ppc603",
968         },
969         {       /* e300c1 (a 603e core, plus some) on 83xx */
970                 .pvr_mask               = 0x7fff0000,
971                 .pvr_value              = 0x00830000,
972                 .cpu_name               = "e300c1",
973                 .cpu_features           = CPU_FTRS_E300,
974                 .cpu_user_features      = COMMON_USER,
975                 .icache_bsize           = 32,
976                 .dcache_bsize           = 32,
977                 .cpu_setup              = __setup_cpu_603,
978                 .machine_check          = machine_check_generic,
979                 .platform               = "ppc603",
980         },
981         {       /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
982                 .pvr_mask               = 0x7fff0000,
983                 .pvr_value              = 0x00840000,
984                 .cpu_name               = "e300c2",
985                 .cpu_features           = CPU_FTRS_E300C2,
986                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
987                 .icache_bsize           = 32,
988                 .dcache_bsize           = 32,
989                 .cpu_setup              = __setup_cpu_603,
990                 .machine_check          = machine_check_generic,
991                 .platform               = "ppc603",
992         },
993         {       /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
994                 .pvr_mask               = 0x7fff0000,
995                 .pvr_value              = 0x00850000,
996                 .cpu_name               = "e300c3",
997                 .cpu_features           = CPU_FTRS_E300,
998                 .cpu_user_features      = COMMON_USER,
999                 .icache_bsize           = 32,
1000                 .dcache_bsize           = 32,
1001                 .cpu_setup              = __setup_cpu_603,
1002                 .num_pmcs               = 4,
1003                 .oprofile_cpu_type      = "ppc/e300",
1004                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1005                 .platform               = "ppc603",
1006         },
1007         {       /* e300c4 (e300c1, plus one IU) */
1008                 .pvr_mask               = 0x7fff0000,
1009                 .pvr_value              = 0x00860000,
1010                 .cpu_name               = "e300c4",
1011                 .cpu_features           = CPU_FTRS_E300,
1012                 .cpu_user_features      = COMMON_USER,
1013                 .icache_bsize           = 32,
1014                 .dcache_bsize           = 32,
1015                 .cpu_setup              = __setup_cpu_603,
1016                 .machine_check          = machine_check_generic,
1017                 .num_pmcs               = 4,
1018                 .oprofile_cpu_type      = "ppc/e300",
1019                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1020                 .platform               = "ppc603",
1021         },
1022         {       /* default match, we assume split I/D cache & TB (non-601)... */
1023                 .pvr_mask               = 0x00000000,
1024                 .pvr_value              = 0x00000000,
1025                 .cpu_name               = "(generic PPC)",
1026                 .cpu_features           = CPU_FTRS_CLASSIC32,
1027                 .cpu_user_features      = COMMON_USER,
1028                 .icache_bsize           = 32,
1029                 .dcache_bsize           = 32,
1030                 .machine_check          = machine_check_generic,
1031                 .platform               = "ppc603",
1032         },
1033 #endif /* CLASSIC_PPC */
1034 #ifdef CONFIG_8xx
1035         {       /* 8xx */
1036                 .pvr_mask               = 0xffff0000,
1037                 .pvr_value              = 0x00500000,
1038                 .cpu_name               = "8xx",
1039                 /* CPU_FTR_MAYBE_CAN_DOZE is possible,
1040                  * if the 8xx code is there.... */
1041                 .cpu_features           = CPU_FTRS_8XX,
1042                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1043                 .icache_bsize           = 16,
1044                 .dcache_bsize           = 16,
1045                 .platform               = "ppc823",
1046         },
1047 #endif /* CONFIG_8xx */
1048 #ifdef CONFIG_40x
1049         {       /* 403GC */
1050                 .pvr_mask               = 0xffffff00,
1051                 .pvr_value              = 0x00200200,
1052                 .cpu_name               = "403GC",
1053                 .cpu_features           = CPU_FTRS_40X,
1054                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1055                 .icache_bsize           = 16,
1056                 .dcache_bsize           = 16,
1057                 .machine_check          = machine_check_4xx,
1058                 .platform               = "ppc403",
1059         },
1060         {       /* 403GCX */
1061                 .pvr_mask               = 0xffffff00,
1062                 .pvr_value              = 0x00201400,
1063                 .cpu_name               = "403GCX",
1064                 .cpu_features           = CPU_FTRS_40X,
1065                 .cpu_user_features      = PPC_FEATURE_32 |
1066                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
1067                 .icache_bsize           = 16,
1068                 .dcache_bsize           = 16,
1069                 .machine_check          = machine_check_4xx,
1070                 .platform               = "ppc403",
1071         },
1072         {       /* 403G ?? */
1073                 .pvr_mask               = 0xffff0000,
1074                 .pvr_value              = 0x00200000,
1075                 .cpu_name               = "403G ??",
1076                 .cpu_features           = CPU_FTRS_40X,
1077                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1078                 .icache_bsize           = 16,
1079                 .dcache_bsize           = 16,
1080                 .machine_check          = machine_check_4xx,
1081                 .platform               = "ppc403",
1082         },
1083         {       /* 405GP */
1084                 .pvr_mask               = 0xffff0000,
1085                 .pvr_value              = 0x40110000,
1086                 .cpu_name               = "405GP",
1087                 .cpu_features           = CPU_FTRS_40X,
1088                 .cpu_user_features      = PPC_FEATURE_32 |
1089                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1090                 .icache_bsize           = 32,
1091                 .dcache_bsize           = 32,
1092                 .machine_check          = machine_check_4xx,
1093                 .platform               = "ppc405",
1094         },
1095         {       /* STB 03xxx */
1096                 .pvr_mask               = 0xffff0000,
1097                 .pvr_value              = 0x40130000,
1098                 .cpu_name               = "STB03xxx",
1099                 .cpu_features           = CPU_FTRS_40X,
1100                 .cpu_user_features      = PPC_FEATURE_32 |
1101                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1102                 .icache_bsize           = 32,
1103                 .dcache_bsize           = 32,
1104                 .machine_check          = machine_check_4xx,
1105                 .platform               = "ppc405",
1106         },
1107         {       /* STB 04xxx */
1108                 .pvr_mask               = 0xffff0000,
1109                 .pvr_value              = 0x41810000,
1110                 .cpu_name               = "STB04xxx",
1111                 .cpu_features           = CPU_FTRS_40X,
1112                 .cpu_user_features      = PPC_FEATURE_32 |
1113                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1114                 .icache_bsize           = 32,
1115                 .dcache_bsize           = 32,
1116                 .machine_check          = machine_check_4xx,
1117                 .platform               = "ppc405",
1118         },
1119         {       /* NP405L */
1120                 .pvr_mask               = 0xffff0000,
1121                 .pvr_value              = 0x41610000,
1122                 .cpu_name               = "NP405L",
1123                 .cpu_features           = CPU_FTRS_40X,
1124                 .cpu_user_features      = PPC_FEATURE_32 |
1125                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1126                 .icache_bsize           = 32,
1127                 .dcache_bsize           = 32,
1128                 .machine_check          = machine_check_4xx,
1129                 .platform               = "ppc405",
1130         },
1131         {       /* NP4GS3 */
1132                 .pvr_mask               = 0xffff0000,
1133                 .pvr_value              = 0x40B10000,
1134                 .cpu_name               = "NP4GS3",
1135                 .cpu_features           = CPU_FTRS_40X,
1136                 .cpu_user_features      = PPC_FEATURE_32 |
1137                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1138                 .icache_bsize           = 32,
1139                 .dcache_bsize           = 32,
1140                 .machine_check          = machine_check_4xx,
1141                 .platform               = "ppc405",
1142         },
1143         {   /* NP405H */
1144                 .pvr_mask               = 0xffff0000,
1145                 .pvr_value              = 0x41410000,
1146                 .cpu_name               = "NP405H",
1147                 .cpu_features           = CPU_FTRS_40X,
1148                 .cpu_user_features      = PPC_FEATURE_32 |
1149                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1150                 .icache_bsize           = 32,
1151                 .dcache_bsize           = 32,
1152                 .machine_check          = machine_check_4xx,
1153                 .platform               = "ppc405",
1154         },
1155         {       /* 405GPr */
1156                 .pvr_mask               = 0xffff0000,
1157                 .pvr_value              = 0x50910000,
1158                 .cpu_name               = "405GPr",
1159                 .cpu_features           = CPU_FTRS_40X,
1160                 .cpu_user_features      = PPC_FEATURE_32 |
1161                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1162                 .icache_bsize           = 32,
1163                 .dcache_bsize           = 32,
1164                 .machine_check          = machine_check_4xx,
1165                 .platform               = "ppc405",
1166         },
1167         {   /* STBx25xx */
1168                 .pvr_mask               = 0xffff0000,
1169                 .pvr_value              = 0x51510000,
1170                 .cpu_name               = "STBx25xx",
1171                 .cpu_features           = CPU_FTRS_40X,
1172                 .cpu_user_features      = PPC_FEATURE_32 |
1173                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1174                 .icache_bsize           = 32,
1175                 .dcache_bsize           = 32,
1176                 .machine_check          = machine_check_4xx,
1177                 .platform               = "ppc405",
1178         },
1179         {       /* 405LP */
1180                 .pvr_mask               = 0xffff0000,
1181                 .pvr_value              = 0x41F10000,
1182                 .cpu_name               = "405LP",
1183                 .cpu_features           = CPU_FTRS_40X,
1184                 .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1185                 .icache_bsize           = 32,
1186                 .dcache_bsize           = 32,
1187                 .machine_check          = machine_check_4xx,
1188                 .platform               = "ppc405",
1189         },
1190         {       /* Xilinx Virtex-II Pro  */
1191                 .pvr_mask               = 0xfffff000,
1192                 .pvr_value              = 0x20010000,
1193                 .cpu_name               = "Virtex-II Pro",
1194                 .cpu_features           = CPU_FTRS_40X,
1195                 .cpu_user_features      = PPC_FEATURE_32 |
1196                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1197                 .icache_bsize           = 32,
1198                 .dcache_bsize           = 32,
1199                 .machine_check          = machine_check_4xx,
1200                 .platform               = "ppc405",
1201         },
1202         {       /* Xilinx Virtex-4 FX */
1203                 .pvr_mask               = 0xfffff000,
1204                 .pvr_value              = 0x20011000,
1205                 .cpu_name               = "Virtex-4 FX",
1206                 .cpu_features           = CPU_FTRS_40X,
1207                 .cpu_user_features      = PPC_FEATURE_32 |
1208                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1209                 .icache_bsize           = 32,
1210                 .dcache_bsize           = 32,
1211                 .machine_check          = machine_check_4xx,
1212                 .platform               = "ppc405",
1213         },
1214         {       /* 405EP */
1215                 .pvr_mask               = 0xffff0000,
1216                 .pvr_value              = 0x51210000,
1217                 .cpu_name               = "405EP",
1218                 .cpu_features           = CPU_FTRS_40X,
1219                 .cpu_user_features      = PPC_FEATURE_32 |
1220                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1221                 .icache_bsize           = 32,
1222                 .dcache_bsize           = 32,
1223                 .machine_check          = machine_check_4xx,
1224                 .platform               = "ppc405",
1225         },
1226         {       /* 405EX */
1227                 .pvr_mask               = 0xffff0004,
1228                 .pvr_value              = 0x12910004,
1229                 .cpu_name               = "405EX",
1230                 .cpu_features           = CPU_FTRS_40X,
1231                 .cpu_user_features      = PPC_FEATURE_32 |
1232                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1233                 .icache_bsize           = 32,
1234                 .dcache_bsize           = 32,
1235                 .machine_check          = machine_check_4xx,
1236                 .platform               = "ppc405",
1237         },
1238         {       /* 405EXr */
1239                 .pvr_mask               = 0xffff0004,
1240                 .pvr_value              = 0x12910000,
1241                 .cpu_name               = "405EXr",
1242                 .cpu_features           = CPU_FTRS_40X,
1243                 .cpu_user_features      = PPC_FEATURE_32 |
1244                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1245                 .icache_bsize           = 32,
1246                 .dcache_bsize           = 32,
1247                 .machine_check          = machine_check_4xx,
1248                 .platform               = "ppc405",
1249         },
1250         {       /* default match */
1251                 .pvr_mask               = 0x00000000,
1252                 .pvr_value              = 0x00000000,
1253                 .cpu_name               = "(generic 40x PPC)",
1254                 .cpu_features           = CPU_FTRS_40X,
1255                 .cpu_user_features      = PPC_FEATURE_32 |
1256                         PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1257                 .icache_bsize           = 32,
1258                 .dcache_bsize           = 32,
1259                 .machine_check          = machine_check_4xx,
1260                 .platform               = "ppc405",
1261         }
1262
1263 #endif /* CONFIG_40x */
1264 #ifdef CONFIG_44x
1265         {
1266                 .pvr_mask               = 0xf0000fff,
1267                 .pvr_value              = 0x40000850,
1268                 .cpu_name               = "440GR Rev. A",
1269                 .cpu_features           = CPU_FTRS_44X,
1270                 .cpu_user_features      = COMMON_USER_BOOKE,
1271                 .icache_bsize           = 32,
1272                 .dcache_bsize           = 32,
1273                 .machine_check          = machine_check_4xx,
1274                 .platform               = "ppc440",
1275         },
1276         { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1277                 .pvr_mask               = 0xf0000fff,
1278                 .pvr_value              = 0x40000858,
1279                 .cpu_name               = "440EP Rev. A",
1280                 .cpu_features           = CPU_FTRS_44X,
1281                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1282                 .icache_bsize           = 32,
1283                 .dcache_bsize           = 32,
1284                 .cpu_setup              = __setup_cpu_440ep,
1285                 .machine_check          = machine_check_4xx,
1286                 .platform               = "ppc440",
1287         },
1288         {
1289                 .pvr_mask               = 0xf0000fff,
1290                 .pvr_value              = 0x400008d3,
1291                 .cpu_name               = "440GR Rev. B",
1292                 .cpu_features           = CPU_FTRS_44X,
1293                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1294                 .icache_bsize           = 32,
1295                 .dcache_bsize           = 32,
1296                 .machine_check          = machine_check_4xx,
1297                 .platform               = "ppc440",
1298         },
1299         { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1300                 .pvr_mask               = 0xf0000ff7,
1301                 .pvr_value              = 0x400008d4,
1302                 .cpu_name               = "440EP Rev. C",
1303                 .cpu_features           = CPU_FTRS_44X,
1304                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1305                 .icache_bsize           = 32,
1306                 .dcache_bsize           = 32,
1307                 .cpu_setup              = __setup_cpu_440ep,
1308                 .machine_check          = machine_check_4xx,
1309                 .platform               = "ppc440",
1310         },
1311         { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1312                 .pvr_mask               = 0xf0000fff,
1313                 .pvr_value              = 0x400008db,
1314                 .cpu_name               = "440EP Rev. B",
1315                 .cpu_features           = CPU_FTRS_44X,
1316                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1317                 .icache_bsize           = 32,
1318                 .dcache_bsize           = 32,
1319                 .cpu_setup              = __setup_cpu_440ep,
1320                 .machine_check          = machine_check_4xx,
1321                 .platform               = "ppc440",
1322         },
1323         { /* 440GRX */
1324                 .pvr_mask               = 0xf0000ffb,
1325                 .pvr_value              = 0x200008D0,
1326                 .cpu_name               = "440GRX",
1327                 .cpu_features           = CPU_FTRS_44X,
1328                 .cpu_user_features      = COMMON_USER_BOOKE,
1329                 .icache_bsize           = 32,
1330                 .dcache_bsize           = 32,
1331                 .cpu_setup              = __setup_cpu_440grx,
1332                 .machine_check          = machine_check_440A,
1333                 .platform               = "ppc440",
1334         },
1335         { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1336                 .pvr_mask               = 0xf0000ffb,
1337                 .pvr_value              = 0x200008D8,
1338                 .cpu_name               = "440EPX",
1339                 .cpu_features           = CPU_FTRS_44X,
1340                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1341                 .icache_bsize           = 32,
1342                 .dcache_bsize           = 32,
1343                 .cpu_setup              = __setup_cpu_440epx,
1344                 .machine_check          = machine_check_440A,
1345                 .platform               = "ppc440",
1346         },
1347         {       /* 440GP Rev. B */
1348                 .pvr_mask               = 0xf0000fff,
1349                 .pvr_value              = 0x40000440,
1350                 .cpu_name               = "440GP Rev. B",
1351                 .cpu_features           = CPU_FTRS_44X,
1352                 .cpu_user_features      = COMMON_USER_BOOKE,
1353                 .icache_bsize           = 32,
1354                 .dcache_bsize           = 32,
1355                 .machine_check          = machine_check_4xx,
1356                 .platform               = "ppc440gp",
1357         },
1358         {       /* 440GP Rev. C */
1359                 .pvr_mask               = 0xf0000fff,
1360                 .pvr_value              = 0x40000481,
1361                 .cpu_name               = "440GP Rev. C",
1362                 .cpu_features           = CPU_FTRS_44X,
1363                 .cpu_user_features      = COMMON_USER_BOOKE,
1364                 .icache_bsize           = 32,
1365                 .dcache_bsize           = 32,
1366                 .machine_check          = machine_check_4xx,
1367                 .platform               = "ppc440gp",
1368         },
1369         { /* 440GX Rev. A */
1370                 .pvr_mask               = 0xf0000fff,
1371                 .pvr_value              = 0x50000850,
1372                 .cpu_name               = "440GX Rev. A",
1373                 .cpu_features           = CPU_FTRS_44X,
1374                 .cpu_user_features      = COMMON_USER_BOOKE,
1375                 .icache_bsize           = 32,
1376                 .dcache_bsize           = 32,
1377                 .cpu_setup              = __setup_cpu_440gx,
1378                 .machine_check          = machine_check_440A,
1379                 .platform               = "ppc440",
1380         },
1381         { /* 440GX Rev. B */
1382                 .pvr_mask               = 0xf0000fff,
1383                 .pvr_value              = 0x50000851,
1384                 .cpu_name               = "440GX Rev. B",
1385                 .cpu_features           = CPU_FTRS_44X,
1386                 .cpu_user_features      = COMMON_USER_BOOKE,
1387                 .icache_bsize           = 32,
1388                 .dcache_bsize           = 32,
1389                 .cpu_setup              = __setup_cpu_440gx,
1390                 .machine_check          = machine_check_440A,
1391                 .platform               = "ppc440",
1392         },
1393         { /* 440GX Rev. C */
1394                 .pvr_mask               = 0xf0000fff,
1395                 .pvr_value              = 0x50000892,
1396                 .cpu_name               = "440GX Rev. C",
1397                 .cpu_features           = CPU_FTRS_44X,
1398                 .cpu_user_features      = COMMON_USER_BOOKE,
1399                 .icache_bsize           = 32,
1400                 .dcache_bsize           = 32,
1401                 .cpu_setup              = __setup_cpu_440gx,
1402                 .machine_check          = machine_check_440A,
1403                 .platform               = "ppc440",
1404         },
1405         { /* 440GX Rev. F */
1406                 .pvr_mask               = 0xf0000fff,
1407                 .pvr_value              = 0x50000894,
1408                 .cpu_name               = "440GX Rev. F",
1409                 .cpu_features           = CPU_FTRS_44X,
1410                 .cpu_user_features      = COMMON_USER_BOOKE,
1411                 .icache_bsize           = 32,
1412                 .dcache_bsize           = 32,
1413                 .cpu_setup              = __setup_cpu_440gx,
1414                 .machine_check          = machine_check_440A,
1415                 .platform               = "ppc440",
1416         },
1417         { /* 440SP Rev. A */
1418                 .pvr_mask               = 0xfff00fff,
1419                 .pvr_value              = 0x53200891,
1420                 .cpu_name               = "440SP Rev. A",
1421                 .cpu_features           = CPU_FTRS_44X,
1422                 .cpu_user_features      = COMMON_USER_BOOKE,
1423                 .icache_bsize           = 32,
1424                 .dcache_bsize           = 32,
1425                 .machine_check          = machine_check_4xx,
1426                 .platform               = "ppc440",
1427         },
1428         { /* 440SPe Rev. A */
1429                 .pvr_mask               = 0xfff00fff,
1430                 .pvr_value              = 0x53400890,
1431                 .cpu_name               = "440SPe Rev. A",
1432                 .cpu_features           = CPU_FTRS_44X,
1433                 .cpu_user_features      = COMMON_USER_BOOKE,
1434                 .icache_bsize           = 32,
1435                 .dcache_bsize           = 32,
1436                 .cpu_setup              = __setup_cpu_440spe,
1437                 .machine_check          = machine_check_440A,
1438                 .platform               = "ppc440",
1439         },
1440         { /* 440SPe Rev. B */
1441                 .pvr_mask               = 0xfff00fff,
1442                 .pvr_value              = 0x53400891,
1443                 .cpu_name               = "440SPe Rev. B",
1444                 .cpu_features           = CPU_FTRS_44X,
1445                 .cpu_user_features      = COMMON_USER_BOOKE,
1446                 .icache_bsize           = 32,
1447                 .dcache_bsize           = 32,
1448                 .cpu_setup              = __setup_cpu_440spe,
1449                 .machine_check          = machine_check_440A,
1450                 .platform               = "ppc440",
1451         },
1452         { /* 440 in Xilinx Virtex-5 FXT */
1453                 .pvr_mask               = 0xfffffff0,
1454                 .pvr_value              = 0x7ff21910,
1455                 .cpu_name               = "440 in Virtex-5 FXT",
1456                 .cpu_features           = CPU_FTRS_44X,
1457                 .cpu_user_features      = COMMON_USER_BOOKE,
1458                 .icache_bsize           = 32,
1459                 .dcache_bsize           = 32,
1460                 .platform               = "ppc440",
1461         },
1462         { /* 460EX */
1463                 .pvr_mask               = 0xffff0002,
1464                 .pvr_value              = 0x13020002,
1465                 .cpu_name               = "460EX",
1466                 .cpu_features           = CPU_FTRS_44X,
1467                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1468                 .icache_bsize           = 32,
1469                 .dcache_bsize           = 32,
1470                 .cpu_setup              = __setup_cpu_460ex,
1471                 .machine_check          = machine_check_440A,
1472                 .platform               = "ppc440",
1473         },
1474         { /* 460GT */
1475                 .pvr_mask               = 0xffff0002,
1476                 .pvr_value              = 0x13020000,
1477                 .cpu_name               = "460GT",
1478                 .cpu_features           = CPU_FTRS_44X,
1479                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1480                 .icache_bsize           = 32,
1481                 .dcache_bsize           = 32,
1482                 .cpu_setup              = __setup_cpu_460gt,
1483                 .machine_check          = machine_check_440A,
1484                 .platform               = "ppc440",
1485         },
1486         {       /* default match */
1487                 .pvr_mask               = 0x00000000,
1488                 .pvr_value              = 0x00000000,
1489                 .cpu_name               = "(generic 44x PPC)",
1490                 .cpu_features           = CPU_FTRS_44X,
1491                 .cpu_user_features      = COMMON_USER_BOOKE,
1492                 .icache_bsize           = 32,
1493                 .dcache_bsize           = 32,
1494                 .machine_check          = machine_check_4xx,
1495                 .platform               = "ppc440",
1496         }
1497 #endif /* CONFIG_44x */
1498 #ifdef CONFIG_E200
1499         {       /* e200z5 */
1500                 .pvr_mask               = 0xfff00000,
1501                 .pvr_value              = 0x81000000,
1502                 .cpu_name               = "e200z5",
1503                 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1504                 .cpu_features           = CPU_FTRS_E200,
1505                 .cpu_user_features      = COMMON_USER_BOOKE |
1506                         PPC_FEATURE_HAS_EFP_SINGLE |
1507                         PPC_FEATURE_UNIFIED_CACHE,
1508                 .dcache_bsize           = 32,
1509                 .machine_check          = machine_check_e200,
1510                 .platform               = "ppc5554",
1511         },
1512         {       /* e200z6 */
1513                 .pvr_mask               = 0xfff00000,
1514                 .pvr_value              = 0x81100000,
1515                 .cpu_name               = "e200z6",
1516                 /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
1517                 .cpu_features           = CPU_FTRS_E200,
1518                 .cpu_user_features      = COMMON_USER_BOOKE |
1519                         PPC_FEATURE_HAS_SPE_COMP |
1520                         PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1521                         PPC_FEATURE_UNIFIED_CACHE,
1522                 .dcache_bsize           = 32,
1523                 .machine_check          = machine_check_e200,
1524                 .platform               = "ppc5554",
1525         },
1526         {       /* default match */
1527                 .pvr_mask               = 0x00000000,
1528                 .pvr_value              = 0x00000000,
1529                 .cpu_name               = "(generic E200 PPC)",
1530                 .cpu_features           = CPU_FTRS_E200,
1531                 .cpu_user_features      = COMMON_USER_BOOKE |
1532                         PPC_FEATURE_HAS_EFP_SINGLE |
1533                         PPC_FEATURE_UNIFIED_CACHE,
1534                 .dcache_bsize           = 32,
1535                 .machine_check          = machine_check_e200,
1536                 .platform               = "ppc5554",
1537         }
1538 #endif /* CONFIG_E200 */
1539 #ifdef CONFIG_E500
1540         {       /* e500 */
1541                 .pvr_mask               = 0xffff0000,
1542                 .pvr_value              = 0x80200000,
1543                 .cpu_name               = "e500",
1544                 .cpu_features           = CPU_FTRS_E500,
1545                 .cpu_user_features      = COMMON_USER_BOOKE |
1546                         PPC_FEATURE_HAS_SPE_COMP |
1547                         PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1548                 .icache_bsize           = 32,
1549                 .dcache_bsize           = 32,
1550                 .num_pmcs               = 4,
1551                 .oprofile_cpu_type      = "ppc/e500",
1552                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1553                 .machine_check          = machine_check_e500,
1554                 .platform               = "ppc8540",
1555         },
1556         {       /* e500v2 */
1557                 .pvr_mask               = 0xffff0000,
1558                 .pvr_value              = 0x80210000,
1559                 .cpu_name               = "e500v2",
1560                 .cpu_features           = CPU_FTRS_E500_2,
1561                 .cpu_user_features      = COMMON_USER_BOOKE |
1562                         PPC_FEATURE_HAS_SPE_COMP |
1563                         PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1564                         PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
1565                 .icache_bsize           = 32,
1566                 .dcache_bsize           = 32,
1567                 .num_pmcs               = 4,
1568                 .oprofile_cpu_type      = "ppc/e500",
1569                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1570                 .machine_check          = machine_check_e500,
1571                 .platform               = "ppc8548",
1572         },
1573         {       /* e500mc */
1574                 .pvr_mask               = 0xffff0000,
1575                 .pvr_value              = 0x80230000,
1576                 .cpu_name               = "e500mc",
1577                 .cpu_features           = CPU_FTRS_E500MC,
1578                 .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1579                 .icache_bsize           = 64,
1580                 .dcache_bsize           = 64,
1581                 .num_pmcs               = 4,
1582                 .oprofile_cpu_type      = "ppc/e500", /* xxx - galak, e500mc? */
1583                 .oprofile_type          = PPC_OPROFILE_FSL_EMB,
1584                 .machine_check          = machine_check_e500,
1585                 .platform               = "ppce500mc",
1586         },
1587         {       /* default match */
1588                 .pvr_mask               = 0x00000000,
1589                 .pvr_value              = 0x00000000,
1590                 .cpu_name               = "(generic E500 PPC)",
1591                 .cpu_features           = CPU_FTRS_E500,
1592                 .cpu_user_features      = COMMON_USER_BOOKE |
1593                         PPC_FEATURE_HAS_SPE_COMP |
1594                         PPC_FEATURE_HAS_EFP_SINGLE_COMP,
1595                 .icache_bsize           = 32,
1596                 .dcache_bsize           = 32,
1597                 .machine_check          = machine_check_e500,
1598                 .platform               = "powerpc",
1599         }
1600 #endif /* CONFIG_E500 */
1601 #endif /* CONFIG_PPC32 */
1602 };
1603
1604 static struct cpu_spec the_cpu_spec;
1605
1606 struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1607 {
1608         struct cpu_spec *s = cpu_specs;
1609         struct cpu_spec *t = &the_cpu_spec;
1610         int i;
1611
1612         s = PTRRELOC(s);
1613         t = PTRRELOC(t);
1614
1615         for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
1616                 if ((pvr & s->pvr_mask) == s->pvr_value) {
1617                         /*
1618                          * If we are overriding a previous value derived
1619                          * from the real PVR with a new value obtained
1620                          * using a logical PVR value, don't modify the
1621                          * performance monitor fields.
1622                          */
1623                         if (t->num_pmcs && !s->num_pmcs) {
1624                                 t->cpu_name = s->cpu_name;
1625                                 t->cpu_features = s->cpu_features;
1626                                 t->cpu_user_features = s->cpu_user_features;
1627                                 t->icache_bsize = s->icache_bsize;
1628                                 t->dcache_bsize = s->dcache_bsize;
1629                                 t->cpu_setup = s->cpu_setup;
1630                                 t->cpu_restore = s->cpu_restore;
1631                                 t->platform = s->platform;
1632                         } else
1633                                 *t = *s;
1634                         *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
1635 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
1636                         /* ppc64 and booke expect identify_cpu to also call
1637                          * setup_cpu for that processor. I will consolidate
1638                          * that at a later time, for now, just use #ifdef.
1639                          * we also don't need to PTRRELOC the function pointer
1640                          * on ppc64 and booke as we are running at 0 in real
1641                          * mode on ppc64 and reloc_offset is always 0 on booke.
1642                          */
1643                         if (s->cpu_setup) {
1644                                 s->cpu_setup(offset, s);
1645                         }
1646 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
1647                         return s;
1648                 }
1649         BUG();
1650         return NULL;
1651 }