From a65dc10ffad1e041b4ad3559a026a8bb2b40b77e Mon Sep 17 00:00:00 2001 From: Joseph Lo Date: Mon, 15 Apr 2013 16:50:54 -0600 Subject: [PATCH] ARM: tegra: fix relocation truncated error when THUMB2_KERNEL enabled The conditional branch instruction in Thumb2 only available to short range. The linker will fail when the conditional branch over the range. Then resulting in link error when generating kernel image. e.g.: arch/arm/mach-tegra/reset-handler.S:47:(.text+0xf8e): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `cpu_resume' defined in .data section in arch/arm/kernel/built-in.o This patch using a Thumb2 instruction IT (if-then) to have a longer branch range. Reported-by: Arnd Bergmann Signed-off-by: Joseph Lo Signed-off-by: Stephen Warren Reviewed-by: Dave Martin Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/reset-handler.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S index 1676aba5e7b8..e6de88a2ea06 100644 --- a/arch/arm/mach-tegra/reset-handler.S +++ b/arch/arm/mach-tegra/reset-handler.S @@ -44,6 +44,7 @@ ENTRY(tegra_resume) cpu_id r0 cmp r0, #0 @ CPU0? + THUMB( it ne ) bne cpu_resume @ no #ifdef CONFIG_ARCH_TEGRA_3x_SOC -- 2.20.1