AW: Re: __setup_cpu_be problem

Geoff Levand geoffrey.levand at am.sony.com
Tue Feb 14 13:08:01 EST 2006


Arnd Bergmann wrote:
> That means that we can just rip out the HID6 setup from the kernel
> without losing the ability for 16M pages. Geoff, please submit a
> patch to replace __setup_cpu_be with __setup_cpu_power4 if that
> solves your problem.

This patch removes the incorrect and unneeded Cell processor setup 
routine __setup_cpu_be.  __setup_cpu_be improperly accesses the
hypervisor page size configuration at SPR HID6.  The correct behavior
is for the firmware or hypervisor to setup the correct page size 
configuration and pass those settings to the kernel in the device-tree.


Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>

--


diff --git a/arch/powerpc/kernel/cpu_setup_power4.S b/arch/powerpc/kernel/cpu_setup_power4.S
index b61d86e..5c96481 100644
--- a/arch/powerpc/kernel/cpu_setup_power4.S
+++ b/arch/powerpc/kernel/cpu_setup_power4.S
@@ -76,20 +76,6 @@ _GLOBAL(__970_cpu_preinit)
 _GLOBAL(__setup_cpu_power4)
 	blr
 
-_GLOBAL(__setup_cpu_be)
-        /* Set large page sizes LP=0: 16MB, LP=1: 64KB */
-        addi    r3, 0,  0
-        ori     r3, r3, HID6_LB
-        sldi    r3, r3, 32
-        nor     r3, r3, r3
-        mfspr   r4, SPRN_HID6
-        and     r4, r4, r3
-        addi    r3, 0, 0x02000
-        sldi    r3, r3, 32
-        or      r4, r4, r3
-        mtspr   SPRN_HID6, r4
-	blr
-
 _GLOBAL(__setup_cpu_ppc970)
 	mfspr	r0,SPRN_HID0
 	li	r11,5			/* clear DOZE and SLEEP */
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 3191be7..19fc380 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -33,7 +33,6 @@ EXPORT_SYMBOL(cur_cpu_spec);
 #ifdef CONFIG_PPC64
 extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
-extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
 #else
 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
@@ -270,7 +269,7 @@ struct cpu_spec	cpu_specs[] = {
 			PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP,
 		.icache_bsize		= 128,
 		.dcache_bsize		= 128,
-		.cpu_setup		= __setup_cpu_be,
+		.cpu_setup		= __setup_cpu_power4,
 		.platform		= "ppc-cell-be",
 	},
 	{	/* default match */




More information about the Linuxppc64-dev mailing list