[POWERPC] Add kernel parameter to set l3cr for MPC745x
[safe/jmp/linux-2.6] / arch / powerpc / kernel / cputable.c
index 11bfbaf..26ffb44 100644 (file)
@@ -31,6 +31,13 @@ EXPORT_SYMBOL(cur_cpu_spec);
  * and ppc64
  */
 #ifdef CONFIG_PPC32
+extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
@@ -43,6 +50,8 @@ extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
 #ifdef CONFIG_PPC64
 extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
+extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
+extern void __restore_cpu_pa6t(void);
 extern void __restore_cpu_ppc970(void);
 #endif /* CONFIG_PPC64 */
 
@@ -66,16 +75,7 @@ extern void __restore_cpu_ppc970(void);
 #define COMMON_USER_BOOKE      (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
                                 PPC_FEATURE_BOOKE)
 
-/* We only set the spe features if the kernel was compiled with
- * spe support
- */
-#ifdef CONFIG_SPE
-#define PPC_FEATURE_SPE_COMP   PPC_FEATURE_HAS_SPE
-#else
-#define PPC_FEATURE_SPE_COMP   0
-#endif
-
-static struct cpu_spec cpu_specs[] = {
+static struct cpu_spec __initdata cpu_specs[] = {
 #ifdef CONFIG_PPC64
        {       /* Power3 */
                .pvr_mask               = 0xffff0000,
@@ -86,8 +86,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power3",
                .oprofile_type          = PPC_OPROFILE_RS64,
+               .machine_check          = machine_check_generic,
                .platform               = "power3",
        },
        {       /* Power3+ */
@@ -99,8 +101,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power3",
                .oprofile_type          = PPC_OPROFILE_RS64,
+               .machine_check          = machine_check_generic,
                .platform               = "power3",
        },
        {       /* Northstar */
@@ -112,8 +116,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/rs64",
                .oprofile_type          = PPC_OPROFILE_RS64,
+               .machine_check          = machine_check_generic,
                .platform               = "rs64",
        },
        {       /* Pulsar */
@@ -125,8 +131,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/rs64",
                .oprofile_type          = PPC_OPROFILE_RS64,
+               .machine_check          = machine_check_generic,
                .platform               = "rs64",
        },
        {       /* I-star */
@@ -138,8 +146,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/rs64",
                .oprofile_type          = PPC_OPROFILE_RS64,
+               .machine_check          = machine_check_generic,
                .platform               = "rs64",
        },
        {       /* S-star */
@@ -151,8 +161,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/rs64",
                .oprofile_type          = PPC_OPROFILE_RS64,
+               .machine_check          = machine_check_generic,
                .platform               = "rs64",
        },
        {       /* Power4 */
@@ -164,8 +176,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power4",
                .oprofile_type          = PPC_OPROFILE_POWER4,
+               .machine_check          = machine_check_generic,
                .platform               = "power4",
        },
        {       /* Power4+ */
@@ -177,8 +191,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power4",
                .oprofile_type          = PPC_OPROFILE_POWER4,
+               .machine_check          = machine_check_generic,
                .platform               = "power4",
        },
        {       /* PPC970 */
@@ -191,10 +207,12 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .cpu_setup              = __setup_cpu_ppc970,
                .cpu_restore            = __restore_cpu_ppc970,
                .oprofile_cpu_type      = "ppc64/970",
                .oprofile_type          = PPC_OPROFILE_POWER4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc970",
        },
        {       /* PPC970FX */
@@ -207,10 +225,30 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .cpu_setup              = __setup_cpu_ppc970,
                .cpu_restore            = __restore_cpu_ppc970,
                .oprofile_cpu_type      = "ppc64/970",
                .oprofile_type          = PPC_OPROFILE_POWER4,
+               .machine_check          = machine_check_generic,
+               .platform               = "ppc970",
+       },
+       {       /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
+               .pvr_mask               = 0xffffffff,
+               .pvr_value              = 0x00440100,
+               .cpu_name               = "PPC970MP",
+               .cpu_features           = CPU_FTRS_PPC970,
+               .cpu_user_features      = COMMON_USER_POWER4 |
+                       PPC_FEATURE_HAS_ALTIVEC_COMP,
+               .icache_bsize           = 128,
+               .dcache_bsize           = 128,
+               .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
+               .cpu_setup              = __setup_cpu_ppc970,
+               .cpu_restore            = __restore_cpu_ppc970,
+               .oprofile_cpu_type      = "ppc64/970MP",
+               .oprofile_type          = PPC_OPROFILE_POWER4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc970",
        },
        {       /* PPC970MP */
@@ -223,10 +261,12 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .cpu_setup              = __setup_cpu_ppc970MP,
                .cpu_restore            = __restore_cpu_ppc970,
                .oprofile_cpu_type      = "ppc64/970MP",
                .oprofile_type          = PPC_OPROFILE_POWER4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc970",
        },
        {       /* PPC970GX */
@@ -239,9 +279,11 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .cpu_setup              = __setup_cpu_ppc970,
                .oprofile_cpu_type      = "ppc64/970",
                .oprofile_type          = PPC_OPROFILE_POWER4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc970",
        },
        {       /* Power5 GR */
@@ -253,6 +295,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power5",
                .oprofile_type          = PPC_OPROFILE_POWER4,
                /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
@@ -260,8 +303,25 @@ static struct cpu_spec cpu_specs[] = {
                 */
                .oprofile_mmcra_sihv    = MMCRA_SIHV,
                .oprofile_mmcra_sipr    = MMCRA_SIPR,
+               .machine_check          = machine_check_generic,
                .platform               = "power5",
        },
+       {       /* Power5++ */
+               .pvr_mask               = 0xffffff00,
+               .pvr_value              = 0x003b0300,
+               .cpu_name               = "POWER5+ (gs)",
+               .cpu_features           = CPU_FTRS_POWER5,
+               .cpu_user_features      = COMMON_USER_POWER5_PLUS,
+               .icache_bsize           = 128,
+               .dcache_bsize           = 128,
+               .num_pmcs               = 6,
+               .oprofile_cpu_type      = "ppc64/power5++",
+               .oprofile_type          = PPC_OPROFILE_POWER4,
+               .oprofile_mmcra_sihv    = MMCRA_SIHV,
+               .oprofile_mmcra_sipr    = MMCRA_SIPR,
+               .machine_check          = machine_check_generic,
+               .platform               = "power5+",
+       },
        {       /* Power5 GS */
                .pvr_mask               = 0xffff0000,
                .pvr_value              = 0x003b0000,
@@ -271,10 +331,12 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power5+",
                .oprofile_type          = PPC_OPROFILE_POWER4,
                .oprofile_mmcra_sihv    = MMCRA_SIHV,
                .oprofile_mmcra_sipr    = MMCRA_SIPR,
+               .machine_check          = machine_check_generic,
                .platform               = "power5+",
        },
        {       /* POWER6 in P5+ mode; 2.04-compliant processor */
@@ -285,13 +347,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_POWER5_PLUS,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
-               .num_pmcs               = 6,
-               .oprofile_cpu_type      = "ppc64/power6",
-               .oprofile_type          = PPC_OPROFILE_POWER4,
-               .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
-               .oprofile_mmcra_sipr    = POWER6_MMCRA_SIPR,
-               .oprofile_mmcra_clear   = POWER6_MMCRA_THRM |
-                       POWER6_MMCRA_OTHER,
+               .machine_check          = machine_check_generic,
                .platform               = "power5+",
        },
        {       /* Power6 */
@@ -304,12 +360,14 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power6",
                .oprofile_type          = PPC_OPROFILE_POWER4,
                .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
                .oprofile_mmcra_sipr    = POWER6_MMCRA_SIPR,
                .oprofile_mmcra_clear   = POWER6_MMCRA_THRM |
                        POWER6_MMCRA_OTHER,
+               .machine_check          = machine_check_generic,
                .platform               = "power6x",
        },
        {       /* 2.05-compliant processor, i.e. Power6 "architected" mode */
@@ -320,13 +378,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_POWER6,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
-               .num_pmcs               = 6,
-               .oprofile_cpu_type      = "ppc64/power6",
-               .oprofile_type          = PPC_OPROFILE_POWER4,
-               .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
-               .oprofile_mmcra_sipr    = POWER6_MMCRA_SIPR,
-               .oprofile_mmcra_clear   = POWER6_MMCRA_THRM |
-                       POWER6_MMCRA_OTHER,
+               .machine_check          = machine_check_generic,
                .platform               = "power6",
        },
        {       /* Cell Broadband Engine */
@@ -340,8 +392,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 4,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/cell-be",
                .oprofile_type          = PPC_OPROFILE_CELL,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc-cell-be",
        },
        {       /* PA Semi PA6T */
@@ -353,6 +407,12 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 64,
                .dcache_bsize           = 64,
                .num_pmcs               = 6,
+               .pmc_type               = PPC_PMC_PA6T,
+               .cpu_setup              = __setup_cpu_pa6t,
+               .cpu_restore            = __restore_cpu_pa6t,
+               .oprofile_cpu_type      = "ppc64/pa6t",
+               .oprofile_type          = PPC_OPROFILE_PA6T,
+               .machine_check          = machine_check_generic,
                .platform               = "pa6t",
        },
        {       /* default match */
@@ -364,6 +424,8 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
+               .pmc_type               = PPC_PMC_IBM,
+               .machine_check          = machine_check_generic,
                .platform               = "power4",
        }
 #endif /* CONFIG_PPC64 */
@@ -378,6 +440,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc601",
        },
        {       /* 603 */
@@ -389,6 +452,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .cpu_setup              = __setup_cpu_603,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc603",
        },
        {       /* 603e */
@@ -400,6 +464,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .cpu_setup              = __setup_cpu_603,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc603",
        },
        {       /* 603ev */
@@ -411,6 +476,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .cpu_setup              = __setup_cpu_603,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc603",
        },
        {       /* 604 */
@@ -423,6 +489,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 2,
                .cpu_setup              = __setup_cpu_604,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc604",
        },
        {       /* 604e */
@@ -435,6 +502,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_604,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc604",
        },
        {       /* 604r */
@@ -447,6 +515,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_604,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc604",
        },
        {       /* 604ev */
@@ -459,6 +528,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_604,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc604",
        },
        {       /* 740/750 (0x4202, don't support TAU ?) */
@@ -471,6 +541,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 750CX (80100 and 8010x?) */
@@ -483,6 +554,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750cx,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 750CX (82201 and 82202) */
@@ -495,6 +567,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750cx,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 750CXe (82214) */
@@ -507,6 +580,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750cx,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 750CXe "Gekko" (83214) */
@@ -519,6 +593,20 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750cx,
+               .machine_check          = machine_check_generic,
+               .platform               = "ppc750",
+       },
+       {       /* 750CL */
+               .pvr_mask               = 0xfffff0f0,
+               .pvr_value              = 0x00087010,
+               .cpu_name               = "750CL",
+               .cpu_features           = CPU_FTRS_750CL,
+               .cpu_user_features      = COMMON_USER | PPC_FEATURE_PPC_LE,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .num_pmcs               = 4,
+               .cpu_setup              = __setup_cpu_750,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 745/755 */
@@ -531,6 +619,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 750FX rev 1.x */
@@ -543,6 +632,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 750FX rev 2.0 must disable HID0[DPM] */
@@ -555,6 +645,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 750FX (All revs except 2.0) */
@@ -567,6 +658,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750fx,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 750GX */
@@ -579,6 +671,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750fx,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 740/750 (L2CR bit need fixup for 740) */
@@ -591,6 +684,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_750,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc750",
        },
        {       /* 7400 rev 1.1 ? (no TAU) */
@@ -604,6 +698,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_7400,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7400",
        },
        {       /* 7400 */
@@ -617,6 +712,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_7400,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7400",
        },
        {       /* 7410 */
@@ -630,6 +726,7 @@ static struct cpu_spec cpu_specs[] = {
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .cpu_setup              = __setup_cpu_7410,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7400",
        },
        {       /* 7450 2.0 - no doze/nap */
@@ -645,6 +742,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7450 2.1 */
@@ -660,6 +758,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7450 2.3 and newer */
@@ -675,6 +774,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7455 rev 1.x */
@@ -690,6 +790,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7455 rev 2.0 */
@@ -705,6 +806,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7455 others */
@@ -720,6 +822,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7447/7457 Rev 1.0 */
@@ -735,6 +838,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7447/7457 Rev 1.1 */
@@ -750,6 +854,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7447/7457 Rev 1.2 and later */
@@ -764,6 +869,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7447A */
@@ -779,13 +885,14 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 7448 */
                .pvr_mask               = 0xffff0000,
                .pvr_value              = 0x80040000,
                .cpu_name               = "7448",
-               .cpu_features           = CPU_FTRS_7447A,
+               .cpu_features           = CPU_FTRS_7448,
                .cpu_user_features      = COMMON_USER |
                        PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
                .icache_bsize           = 32,
@@ -794,6 +901,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_setup              = __setup_cpu_745x,
                .oprofile_cpu_type      = "ppc/7450",
                .oprofile_type          = PPC_OPROFILE_G4,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc7450",
        },
        {       /* 82xx (8240, 8245, 8260 are all 603e cores) */
@@ -805,6 +913,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .cpu_setup              = __setup_cpu_603,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc603",
        },
        {       /* All G2_LE (603e core, plus some) have the same pvr */
@@ -816,6 +925,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .cpu_setup              = __setup_cpu_603,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc603",
        },
        {       /* e300c1 (a 603e core, plus some) on 83xx */
@@ -827,6 +937,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .cpu_setup              = __setup_cpu_603,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc603",
        },
        {       /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
@@ -838,9 +949,10 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .cpu_setup              = __setup_cpu_603,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc603",
        },
-       {       /* e300c3 on 83xx  */
+       {       /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
                .pvr_mask               = 0x7fff0000,
                .pvr_value              = 0x00850000,
                .cpu_name               = "e300c3",
@@ -849,6 +961,24 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .cpu_setup              = __setup_cpu_603,
+               .num_pmcs               = 4,
+               .oprofile_cpu_type      = "ppc/e300",
+               .oprofile_type          = PPC_OPROFILE_FSL_EMB,
+               .platform               = "ppc603",
+       },
+       {       /* e300c4 (e300c1, plus one IU) */
+               .pvr_mask               = 0x7fff0000,
+               .pvr_value              = 0x00860000,
+               .cpu_name               = "e300c4",
+               .cpu_features           = CPU_FTRS_E300,
+               .cpu_user_features      = COMMON_USER,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_603,
+               .machine_check          = machine_check_generic,
+               .num_pmcs               = 4,
+               .oprofile_cpu_type      = "ppc/e300",
+               .oprofile_type          = PPC_OPROFILE_FSL_EMB,
                .platform               = "ppc603",
        },
        {       /* default match, we assume split I/D cache & TB (non-601)... */
@@ -859,6 +989,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_generic,
                .platform               = "ppc603",
        },
 #endif /* CLASSIC_PPC */
@@ -885,6 +1016,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
                .icache_bsize           = 16,
                .dcache_bsize           = 16,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc403",
        },
        {       /* 403GCX */
@@ -896,6 +1028,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
                .icache_bsize           = 16,
                .dcache_bsize           = 16,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc403",
        },
        {       /* 403G ?? */
@@ -906,6 +1039,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
                .icache_bsize           = 16,
                .dcache_bsize           = 16,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc403",
        },
        {       /* 405GP */
@@ -917,6 +1051,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* STB 03xxx */
@@ -928,6 +1063,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* STB 04xxx */
@@ -939,6 +1075,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* NP405L */
@@ -950,6 +1087,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* NP4GS3 */
@@ -961,6 +1099,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {   /* NP405H */
@@ -972,6 +1111,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* 405GPr */
@@ -983,6 +1123,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {   /* STBx25xx */
@@ -994,6 +1135,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* 405LP */
@@ -1004,6 +1146,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* Xilinx Virtex-II Pro  */
@@ -1015,6 +1158,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* Xilinx Virtex-4 FX */
@@ -1026,6 +1170,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
        {       /* 405EP */
@@ -1037,6 +1182,31 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
+               .platform               = "ppc405",
+       },
+       {       /* 405EX */
+               .pvr_mask               = 0xffff0004,
+               .pvr_value              = 0x12910004,
+               .cpu_name               = "405EX",
+               .cpu_features           = CPU_FTRS_40X,
+               .cpu_user_features      = PPC_FEATURE_32 |
+                       PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
+               .platform               = "ppc405",
+       },
+       {       /* 405EXr */
+               .pvr_mask               = 0xffff0004,
+               .pvr_value              = 0x12910000,
+               .cpu_name               = "405EXr",
+               .cpu_features           = CPU_FTRS_40X,
+               .cpu_user_features      = PPC_FEATURE_32 |
+                       PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc405",
        },
 
@@ -1045,21 +1215,83 @@ static struct cpu_spec cpu_specs[] = {
        {
                .pvr_mask               = 0xf0000fff,
                .pvr_value              = 0x40000850,
+               .cpu_name               = "440GR Rev. A",
+               .cpu_features           = CPU_FTRS_44X,
+               .cpu_user_features      = COMMON_USER_BOOKE,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
+               .platform               = "ppc440",
+       },
+       { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
+               .pvr_mask               = 0xf0000fff,
+               .pvr_value              = 0x40000858,
                .cpu_name               = "440EP Rev. A",
                .cpu_features           = CPU_FTRS_44X,
                .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440ep,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc440",
        },
        {
                .pvr_mask               = 0xf0000fff,
                .pvr_value              = 0x400008d3,
+               .cpu_name               = "440GR Rev. B",
+               .cpu_features           = CPU_FTRS_44X,
+               .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
+               .platform               = "ppc440",
+       },
+       { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
+               .pvr_mask               = 0xf0000ff7,
+               .pvr_value              = 0x400008d4,
+               .cpu_name               = "440EP Rev. C",
+               .cpu_features           = CPU_FTRS_44X,
+               .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440ep,
+               .machine_check          = machine_check_4xx,
+               .platform               = "ppc440",
+       },
+       { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
+               .pvr_mask               = 0xf0000fff,
+               .pvr_value              = 0x400008db,
                .cpu_name               = "440EP Rev. B",
                .cpu_features           = CPU_FTRS_44X,
                .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440ep,
+               .machine_check          = machine_check_4xx,
+               .platform               = "ppc440",
+       },
+       { /* 440GRX */
+               .pvr_mask               = 0xf0000ffb,
+               .pvr_value              = 0x200008D0,
+               .cpu_name               = "440GRX",
+               .cpu_features           = CPU_FTRS_44X,
+               .cpu_user_features      = COMMON_USER_BOOKE,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440grx,
+               .machine_check          = machine_check_440A,
+               .platform               = "ppc440",
+       },
+       { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
+               .pvr_mask               = 0xf0000ffb,
+               .pvr_value              = 0x200008D8,
+               .cpu_name               = "440EPX",
+               .cpu_features           = CPU_FTRS_44X,
+               .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440epx,
+               .machine_check          = machine_check_440A,
                .platform               = "ppc440",
        },
        {       /* 440GP Rev. B */
@@ -1070,6 +1302,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc440gp",
        },
        {       /* 440GP Rev. C */
@@ -1080,6 +1313,7 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc440gp",
        },
        { /* 440GX Rev. A */
@@ -1090,6 +1324,8 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440gx,
+               .machine_check          = machine_check_440A,
                .platform               = "ppc440",
        },
        { /* 440GX Rev. B */
@@ -1100,6 +1336,8 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440gx,
+               .machine_check          = machine_check_440A,
                .platform               = "ppc440",
        },
        { /* 440GX Rev. C */
@@ -1110,6 +1348,8 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440gx,
+               .machine_check          = machine_check_440A,
                .platform               = "ppc440",
        },
        { /* 440GX Rev. F */
@@ -1120,31 +1360,72 @@ static struct cpu_spec cpu_specs[] = {
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440gx,
+               .machine_check          = machine_check_440A,
                .platform               = "ppc440",
        },
        { /* 440SP Rev. A */
-               .pvr_mask               = 0xff000fff,
-               .pvr_value              = 0x53000891,
+               .pvr_mask               = 0xfff00fff,
+               .pvr_value              = 0x53200891,
                .cpu_name               = "440SP Rev. A",
                .cpu_features           = CPU_FTRS_44X,
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_4xx,
                .platform               = "ppc440",
        },
        { /* 440SPe Rev. A */
-               .pvr_mask               = 0xff000fff,
-               .pvr_value              = 0x53000890,
-               .cpu_name               = "440SPe Rev. A",
-               .cpu_features           = CPU_FTR_SPLIT_ID_CACHE |
-                       CPU_FTR_USE_TB,
+               .pvr_mask               = 0xfff00fff,
+               .pvr_value              = 0x53400890,
+               .cpu_name               = "440SPe Rev. A",
+               .cpu_features           = CPU_FTRS_44X,
+               .cpu_user_features      = COMMON_USER_BOOKE,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440spe,
+               .machine_check          = machine_check_440A,
+               .platform               = "ppc440",
+       },
+       { /* 440SPe Rev. B */
+               .pvr_mask               = 0xfff00fff,
+               .pvr_value              = 0x53400891,
+               .cpu_name               = "440SPe Rev. B",
+               .cpu_features           = CPU_FTRS_44X,
                .cpu_user_features      = COMMON_USER_BOOKE,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_440spe,
+               .machine_check          = machine_check_440A,
+               .platform               = "ppc440",
+       },
+       { /* 460EX */
+               .pvr_mask               = 0xffff0002,
+               .pvr_value              = 0x13020002,
+               .cpu_name               = "460EX",
+               .cpu_features           = CPU_FTRS_44X,
+               .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_460ex,
+               .machine_check          = machine_check_440A,
+               .platform               = "ppc440",
+       },
+       { /* 460GT */
+               .pvr_mask               = 0xffff0002,
+               .pvr_value              = 0x13020000,
+               .cpu_name               = "460GT",
+               .cpu_features           = CPU_FTRS_44X,
+               .cpu_user_features      = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
+               .icache_bsize           = 32,
+               .dcache_bsize           = 32,
+               .cpu_setup              = __setup_cpu_460gt,
+               .machine_check          = machine_check_440A,
                .platform               = "ppc440",
        },
 #endif /* CONFIG_44x */
 #ifdef CONFIG_FSL_BOOKE
+#ifdef CONFIG_E200
        {       /* e200z5 */
                .pvr_mask               = 0xfff00000,
                .pvr_value              = 0x81000000,
@@ -1155,6 +1436,7 @@ static struct cpu_spec cpu_specs[] = {
                        PPC_FEATURE_HAS_EFP_SINGLE |
                        PPC_FEATURE_UNIFIED_CACHE,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_e200,
                .platform               = "ppc5554",
        },
        {       /* e200z6 */
@@ -1164,12 +1446,14 @@ static struct cpu_spec cpu_specs[] = {
                /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
                .cpu_features           = CPU_FTRS_E200,
                .cpu_user_features      = COMMON_USER_BOOKE |
-                       PPC_FEATURE_SPE_COMP |
-                       PPC_FEATURE_HAS_EFP_SINGLE |
+                       PPC_FEATURE_HAS_SPE_COMP |
+                       PPC_FEATURE_HAS_EFP_SINGLE_COMP |
                        PPC_FEATURE_UNIFIED_CACHE,
                .dcache_bsize           = 32,
+               .machine_check          = machine_check_e200,
                .platform               = "ppc5554",
        },
+#elif defined(CONFIG_E500)
        {       /* e500 */
                .pvr_mask               = 0xffff0000,
                .pvr_value              = 0x80200000,
@@ -1177,13 +1461,14 @@ static struct cpu_spec cpu_specs[] = {
                /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
                .cpu_features           = CPU_FTRS_E500,
                .cpu_user_features      = COMMON_USER_BOOKE |
-                       PPC_FEATURE_SPE_COMP |
-                       PPC_FEATURE_HAS_EFP_SINGLE,
+                       PPC_FEATURE_HAS_SPE_COMP |
+                       PPC_FEATURE_HAS_EFP_SINGLE_COMP,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .oprofile_cpu_type      = "ppc/e500",
-               .oprofile_type          = PPC_OPROFILE_BOOKE,
+               .oprofile_type          = PPC_OPROFILE_FSL_EMB,
+               .machine_check          = machine_check_e500,
                .platform               = "ppc8540",
        },
        {       /* e500v2 */
@@ -1193,17 +1478,19 @@ static struct cpu_spec cpu_specs[] = {
                /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
                .cpu_features           = CPU_FTRS_E500_2,
                .cpu_user_features      = COMMON_USER_BOOKE |
-                       PPC_FEATURE_SPE_COMP |
-                       PPC_FEATURE_HAS_EFP_SINGLE |
-                       PPC_FEATURE_HAS_EFP_DOUBLE,
+                       PPC_FEATURE_HAS_SPE_COMP |
+                       PPC_FEATURE_HAS_EFP_SINGLE_COMP |
+                       PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
                .icache_bsize           = 32,
                .dcache_bsize           = 32,
                .num_pmcs               = 4,
                .oprofile_cpu_type      = "ppc/e500",
-               .oprofile_type          = PPC_OPROFILE_BOOKE,
+               .oprofile_type          = PPC_OPROFILE_FSL_EMB,
+               .machine_check          = machine_check_e500,
                .platform               = "ppc8548",
        },
 #endif
+#endif
 #if !CLASSIC_PPC
        {       /* default match */
                .pvr_mask               = 0x00000000,
@@ -1219,29 +1506,49 @@ static struct cpu_spec cpu_specs[] = {
 #endif /* CONFIG_PPC32 */
 };
 
-struct cpu_spec *identify_cpu(unsigned long offset, unsigned int pvr)
+static struct cpu_spec the_cpu_spec;
+
+struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
 {
        struct cpu_spec *s = cpu_specs;
-       struct cpu_spec **cur = &cur_cpu_spec;
+       struct cpu_spec *t = &the_cpu_spec;
        int i;
 
        s = PTRRELOC(s);
-       cur = PTRRELOC(cur);
+       t = PTRRELOC(t);
 
        for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
                if ((pvr & s->pvr_mask) == s->pvr_value) {
-                       *cur = cpu_specs + i;
-#ifdef CONFIG_PPC64
-                       /* ppc64 expects identify_cpu to also call setup_cpu
-                        * for that processor. I will consolidate that at a
-                        * later time, for now, just use our friend #ifdef.
+                       /*
+                        * If we are overriding a previous value derived
+                        * from the real PVR with a new value obtained
+                        * using a logical PVR value, don't modify the
+                        * performance monitor fields.
+                        */
+                       if (t->num_pmcs && !s->num_pmcs) {
+                               t->cpu_name = s->cpu_name;
+                               t->cpu_features = s->cpu_features;
+                               t->cpu_user_features = s->cpu_user_features;
+                               t->icache_bsize = s->icache_bsize;
+                               t->dcache_bsize = s->dcache_bsize;
+                               t->cpu_setup = s->cpu_setup;
+                               t->cpu_restore = s->cpu_restore;
+                               t->platform = s->platform;
+                       } else
+                               *t = *s;
+                       *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
+#if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
+                       /* ppc64 and booke expect identify_cpu to also call
+                        * setup_cpu for that processor. I will consolidate
+                        * that at a later time, for now, just use #ifdef.
                         * we also don't need to PTRRELOC the function pointer
-                        * on ppc64 as we are running at 0 in real mode.
+                        * on ppc64 and booke as we are running at 0 in real
+                        * mode on ppc64 and reloc_offset is always 0 on booke.
                         */
                        if (s->cpu_setup) {
                                s->cpu_setup(offset, s);
                        }
-#endif /* CONFIG_PPC64 */
+#endif /* CONFIG_PPC64 || CONFIG_BOOKE */
                        return s;
                }
        BUG();