Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/static-call: fix 32-bit build

In 32-bit x86 builds CONFIG_STATIC_CALL_INLINE isn't set, leading to
static_call_initialized not being available.

Define it as "0" in that case.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 0ef8047b737d ("x86/static-call: provide a way to do very early static-call updates")
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Juergen Gross and committed by
Linus Torvalds
349f0086 aef25be3

+6 -1
+6 -1
include/linux/static_call.h
··· 138 138 #ifdef CONFIG_HAVE_STATIC_CALL 139 139 #include <asm/static_call.h> 140 140 141 - extern int static_call_initialized; 142 141 /* 143 142 * Either @site or @tramp can be NULL. 144 143 */ ··· 159 160 #define static_call_query(name) (READ_ONCE(STATIC_CALL_KEY(name).func)) 160 161 161 162 #ifdef CONFIG_HAVE_STATIC_CALL_INLINE 163 + 164 + extern int static_call_initialized; 162 165 163 166 extern int __init static_call_init(void); 164 167 ··· 227 226 228 227 #elif defined(CONFIG_HAVE_STATIC_CALL) 229 228 229 + #define static_call_initialized 0 230 + 230 231 static inline int static_call_init(void) { return 0; } 231 232 232 233 #define DEFINE_STATIC_CALL(name, _func) \ ··· 284 281 EXPORT_SYMBOL_GPL(STATIC_CALL_TRAMP(name)) 285 282 286 283 #else /* Generic implementation */ 284 + 285 + #define static_call_initialized 0 287 286 288 287 static inline int static_call_init(void) { return 0; } 289 288