aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-05-31 09:49:24 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-07-14 13:19:51 +0100
commit29589ca09a74cfc0c50ad002e298bf4b8e69e0bd (patch)
treed0b80ae2b5e94807cbf66188bd8da3bf5fb2b252 /arch/arm/kernel/entry-common.S
parentARM: 9207/1: amba: fix refcount underflow if amba_device_add() fails (diff)
downloadlinux-dev-29589ca09a74cfc0c50ad002e298bf4b8e69e0bd.tar.xz
linux-dev-29589ca09a74cfc0c50ad002e298bf4b8e69e0bd.zip
ARM: 9208/1: entry: add .ltorg directive to keep literals in range
LKP reports a build issue on Clang, related to a literal load of __current issued through the ldr_va macro. This turns out to be due to the fact that group relocations are disabled when CONFIG_COMPILE_TEST=y, which means that the ldr_va macro resolves to a pair of LDR instructions, the first one being a literal load issued too far from its literal pool. Due to the introduction of a couple of new uses of this macro in commit 508074607c7b95b2 ("ARM: 9195/1: entry: avoid explicit literal loads"), the literal pools end up getting rearranged in a way that causes the literal for __current to go out of range. Let's fix this up by putting a .ltorg directive in a suitable place in the code. Link: https://lore.kernel.org/all/202205290805.1vZLAr36-lkp@intel.com/ Fixes: 508074607c7b95b2 ("ARM: 9195/1: entry: avoid explicit literal loads") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to '')
-rw-r--r--arch/arm/kernel/entry-common.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 7aa3ded4af92..6a447ac67d80 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -302,6 +302,7 @@ local_restart:
b ret_fast_syscall
#endif
ENDPROC(vector_swi)
+ .ltorg
/*
* This is the really slow path. We're going to be doing