ppc32: Fix CONFIG_PRINTK=n building
PATCH 1/1 ppc32: Fix CONFIG_PRINTK=n building
The following patch is needed to allow PRINTK=n to work on ppc32.
Direct calls to printk from asm files can't be magically removed so we have to do it manually.
arch/ppc/kernel/fpu.S +2 -0
@@ -91,7 +91,9 @@ KernelFP: ori r3,r3,86f@l mr r4,r2 /* current */ lwz r5,_NIP(r1) +#ifdef CONFIG_PRINTK bl printk +#endif b ret_from_except 86: .string "floating point used in kernel (task=%p, pc=%x)\n" .align 4,0
arch/ppc/kernel/head.S +2 -0
@@ -846,7 +846,9 @@ KernelAltiVec: ori r3,r3,87f@l mr r4,r2 /* current */ lwz r5,_NIP(r1) +#ifdef CONFIG_PRINTK bl printk +#endif b ret_from_except 87: .string "AltiVec used in kernel (task=%p, pc=%x) \n" .align 4,0
arch/ppc/kernel/head_fsl_booke.S +2 -0
@@ -906,7 +906,9 @@ KernelSPE: ori r3,r3,87f@l mr r4,r2 /* current */ lwz r5,_NIP(r1) +#ifdef CONFIG_PRINTK bl printk +#endif b ret_from_except 87: .string "SPE used in kernel (task=%p, pc=%x) \n" .align 4,0
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 10 lines · Tom Rini
The following patch is needed to allow PRINTK=n to work on ppc32.
Direct calls to printk from asm files can't be magically removed so we have to do it manually.
Signed-off-by Tom Rini <[email protected]>Index:
linux-2.6.14/arch/ppc/kernel/fpu.S
===================================================================
---linux-2.6.14.orig/arch/ppc/kernel/fpu.S
This file doesn't exist in mainline. 2.6.14 is too old as a reference for ppc patches due to the arch/powerpc/ merge.
-Matt
Quoted 6 lines · Tom Rini
The following patch is needed to allow PRINTK=n to work on ppc32.
Direct calls to printk from asm files can't be magically removed so we have to do it manually.
Signed-off-by Tom Rini <[email protected]>
Looks good.
Signature · 1 line
Mathematics is the supreme nostalgia of our time.
Quoted 4 lines · Tom Rini
The following patch is needed to allow PRINTK=n to work on ppc32.
Direct calls to printk from asm files can't be magically removed so we have to do it manually.
Nak. We are using arch/powerpc/kernel/fpu.S now (even for ARCH=ppc) and it doesn't do the printk in assembler.
In general I'd prefer to move the printk calls to C code rather than adding these ifdefs.
Paul.