[PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building
Tom Rini
trini at kernel.crashing.org
Wed Nov 9 09:36:31 EST 2005
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 <trini at kernel.crashing.org>
Index: linux-2.6.14/arch/ppc/kernel/fpu.S
===================================================================
--- linux-2.6.14.orig/arch/ppc/kernel/fpu.S
+++ linux-2.6.14/arch/ppc/kernel/fpu.S
@@ -91,7 +91,9 @@ KernelFP:
ori r3,r3,86f at 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
Index: linux-2.6.14/arch/ppc/kernel/head.S
===================================================================
--- linux-2.6.14.orig/arch/ppc/kernel/head.S
+++ linux-2.6.14/arch/ppc/kernel/head.S
@@ -846,7 +846,9 @@ KernelAltiVec:
ori r3,r3,87f at 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
Index: linux-2.6.14/arch/ppc/kernel/head_fsl_booke.S
===================================================================
--- linux-2.6.14.orig/arch/ppc/kernel/head_fsl_booke.S
+++ linux-2.6.14/arch/ppc/kernel/head_fsl_booke.S
@@ -906,7 +906,9 @@ KernelSPE:
ori r3,r3,87f at 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
--
Tom Rini
http://gate.crashing.org/~trini/
More information about the Linuxppc-dev
mailing list