Skip to content

Commit 29589ca

Browse files
ardbiesheuvelRussell King (Oracle)
authored andcommitted
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 5080746 ("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: 5080746 ("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>
1 parent 8030aa3 commit 29589ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arm/kernel/entry-common.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ local_restart:
302302
b ret_fast_syscall
303303
#endif
304304
ENDPROC(vector_swi)
305+
.ltorg
305306

306307
/*
307308
* This is the really slow path. We're going to be doing

0 commit comments

Comments
 (0)