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