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