linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'
@ 2019-03-07  9:14 Arnd Bergmann
  2019-03-07  9:14 ` [PATCH 2/2] ARM: futex: make futex_detect_cmpxchg more reliable Arnd Bergmann
                   ` (3 more replies)
  0 siblings, 4 replies; 47+ messages in thread
From: Arnd Bergmann @ 2019-03-07  9:14 UTC (permalink / raw)
  To: Russell King, Thomas Gleixner, Ingo Molnar, Peter Zijlstra, Darren Hart
  Cc: Nick Desaulniers, Arnd Bergmann, Davidlohr Bueso,
	Elena Reshetova, Greg Kroah-Hartman, linux-kernel

On 32-bit ARM, I got a link failure in futex_init() when building
with clang in some random configurations:

kernel/futex.o:(.text.fixup+0x5c): relocation truncated to fit: R_ARM_JUMP24 against `.init.text'

As far as I can tell, the problem is that a branch is over 16MB
apart in those configurations, but only if it branches back to
the init text.

Marking the futex_detect_cmpxchg() function as noinline and
not __init avoids the problem for me.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/futex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index c3b73b0311bc..dda77ed9f445 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -3849,7 +3849,7 @@ SYSCALL_DEFINE6(futex_time32, u32 __user *, uaddr, int, op, u32, val,
 }
 #endif /* CONFIG_COMPAT_32BIT_TIME */
 
-static void __init futex_detect_cmpxchg(void)
+static noinline void futex_detect_cmpxchg(void)
 {
 #ifndef CONFIG_HAVE_FUTEX_CMPXCHG
 	u32 curval;
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2021-10-25 13:52 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07  9:14 [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline' Arnd Bergmann
2019-03-07  9:14 ` [PATCH 2/2] ARM: futex: make futex_detect_cmpxchg more reliable Arnd Bergmann
2019-03-07 19:39   ` Nick Desaulniers
2019-03-07 23:48     ` Russell King - ARM Linux admin
2019-03-08  0:04       ` Nick Desaulniers
2019-03-08  9:54         ` Russell King - ARM Linux admin
2019-03-08  8:57       ` Ard Biesheuvel
2019-03-08  9:53         ` Russell King - ARM Linux admin
2019-03-08 10:08           ` Ard Biesheuvel
2019-03-08 10:16             ` Ard Biesheuvel
2019-03-08 10:56               ` Russell King - ARM Linux admin
2019-03-08 10:34             ` Russell King - ARM Linux admin
2019-03-08 10:45               ` Ard Biesheuvel
2019-03-08 10:58                 ` Russell King - ARM Linux admin
2019-03-08 11:55                   ` Ard Biesheuvel
2019-03-11 14:34                     ` Arnd Bergmann
2019-03-11 14:36                       ` Ard Biesheuvel
2019-03-11 16:29                         ` Arnd Bergmann
2019-03-11 16:36                           ` Ard Biesheuvel
2019-03-11 20:58                             ` Arnd Bergmann
2019-03-08 11:55                 ` Dave Martin
2019-03-07 17:19 ` [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline' Joe Perches
2019-03-07 17:25   ` Russell King - ARM Linux admin
2019-03-07 17:42     ` Joe Perches
2019-03-07 18:07       ` Russell King - ARM Linux admin
2019-03-07 18:12 ` Nick Desaulniers
2019-03-07 18:21   ` Nathan Chancellor
2019-03-07 22:24     ` Arnd Bergmann
2020-12-12 12:26 ` Marco Elver
2020-12-12 20:01   ` Thomas Gleixner
2020-12-14 10:22     ` Marco Elver
2020-12-14 13:15     ` Arnd Bergmann
2020-12-15  6:09       ` Guo Ren
2020-12-15 11:26         ` Arnd Bergmann
2020-12-15 19:38           ` Sam Ravnborg
2020-12-15 23:24             ` Arnd Bergmann
2020-12-17 15:32               ` Andreas Larsson
2020-12-17 16:43                 ` Arnd Bergmann
2020-12-18 11:08                   ` Andreas Larsson
2020-12-17 20:03               ` Sam Ravnborg
2020-12-16 10:07             ` David Laight
2020-12-16 11:40           ` Peter Zijlstra
2020-12-20 15:44           ` Guo Ren
2020-12-20 17:49             ` Arnd Bergmann
2020-12-21  2:58               ` Guo Ren
2021-07-22 20:05     ` Nathan Chancellor
2021-10-25 13:52       ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).