[PATCH 15/15] ARM: don't discard exit sections for spinlock debugging

Arnd Bergmann arnd at arndb.de
Wed Jan 28 11:48:22 PST 2015


This avoids lots of warnings like this one:

`.exit.text' referenced in section `.alt.smp.init' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o

for each spinlock that is used in an __exit function, because
the smp alternatives try to patch out the spinlock locations.

Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
 arch/arm/kernel/vmlinux.lds.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index fb98c79179e9..f4de6e16d951 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -40,8 +40,7 @@
 #define ARM_CPU_KEEP(x)
 #endif
 
-#if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \
-	defined(CONFIG_GENERIC_BUG)
+#if defined(CONFIG_SMP_ON_UP) || defined(CONFIG_GENERIC_BUG)
 #define ARM_EXIT_KEEP(x)	x
 #define ARM_EXIT_DISCARD(x)
 #else
-- 
2.1.0.rc2




More information about the linux-arm-kernel mailing list