]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc32: Fix boot with ppc970fx CPU
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 10 Sep 2004 01:21:50 +0000 (18:21 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 10 Sep 2004 01:21:50 +0000 (18:21 -0700)
This patch fixes boot on machines with a 970FX CPU, for PPC 32
bits kernels, please apply.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/kernel/cpu_setup_power4.S
arch/ppc/kernel/cputable.c

index 6a6ee985c71973421954d503307dedc8ab18aea0..f2ea1a990f170379a2700166152afba359209d2b 100644 (file)
@@ -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 */
index b3d3d371a25ac6ad845d050d1da2fa39c358abae..6f32ce915ec3116b94f055ec5bb5fec548ef331c 100644 (file)
@@ -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 */