[PATCH] ARM: v7m: only call printk with CONFIG_PRINTK=y

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Feb 26 09:23:37 EST 2014


Otherwise this fails to build (e.g. on efm32_defconfig +
CONFIG_PRINTK=n) with:

	arch/arm/kernel/entry-v7m.S:28: undefined reference to `printk'

.

Suggested-by: Arnd Bergmann <arnd at arndb.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
 arch/arm/kernel/entry-v7m.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
index 2260f1855820..89f902cc5bfe 100644
--- a/arch/arm/kernel/entry-v7m.S
+++ b/arch/arm/kernel/entry-v7m.S
@@ -22,12 +22,14 @@
 
 __invalid_entry:
 	v7m_exception_entry
+#ifdef CONFIG_PRINTK
 	adr	r0, strerr
 	mrs	r1, ipsr
 	mov	r2, lr
 	bl	printk
 	mov	r0, sp
 	bl	show_regs
+#endif
 1:	b	1b
 ENDPROC(__invalid_entry)
 
-- 
1.8.5.3




More information about the linux-arm-kernel mailing list