From 617ea2042641cc1fcfd9564e69e3e708b2075822 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Thu, 9 Sep 2004 18:21:50 -0700 Subject: [PATCH] [PATCH] ppc32: Fix boot with ppc970fx CPU This patch fixes boot on machines with a 970FX CPU, for PPC 32 bits kernels, please apply. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds --- arch/ppc/kernel/cpu_setup_power4.S | 8 ++++++-- arch/ppc/kernel/cputable.c | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/ppc/kernel/cpu_setup_power4.S b/arch/ppc/kernel/cpu_setup_power4.S index 6a6ee985c7197..f2ea1a990f170 100644 --- a/arch/ppc/kernel/cpu_setup_power4.S +++ b/arch/ppc/kernel/cpu_setup_power4.S @@ -112,7 +112,9 @@ _GLOBAL(__save_cpu_setup) /* We only deal with 970 for now */ mfspr r0,SPRN_PVR srwi r0,r0,16 - cmpwi r0,0x39 + cmpwi cr0,r0,0x39 + cmpwi cr1,r0,0x3c + cror 4*cr0+eq,4*cr0+eq,4*cr1+eq bne 1f /* Save HID0,1,4 and 5 */ @@ -144,7 +146,9 @@ _GLOBAL(__restore_cpu_setup) /* We only deal with 970 for now */ mfspr r0,SPRN_PVR srwi r0,r0,16 - cmpwi r0,0x39 + cmpwi cr0,r0,0x39 + cmpwi cr1,r0,0x3c + cror 4*cr0+eq,4*cr0+eq,4*cr1+eq bne 1f /* Clear interrupt prefix */ diff --git a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c index b3d3d371a25ac..6f32ce915ec31 100644 --- a/arch/ppc/kernel/cputable.c +++ b/arch/ppc/kernel/cputable.c @@ -445,6 +445,15 @@ struct cpu_spec cpu_specs[] = { 128, 128, __setup_cpu_ppc970 }, + { /* PPC970FX */ + 0xffff0000, 0x003c0000, "PPC970FX", + CPU_FTR_COMMON | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | + CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP, + COMMON_PPC | PPC_FEATURE_64 | PPC_FEATURE_ALTIVEC_COMP, + 128, 128, + __setup_cpu_ppc970 + }, #endif /* CONFIG_POWER4 */ #ifdef CONFIG_8xx { /* 8xx */ -- 2.53.0