Skip to content

Commit 5d16dd1

Browse files
jgross1gregkh
authored andcommitted
x86/static-call: fix 32-bit build
commit 349f0086ba8b2a169877d21ff15a4d9da3a60054 upstream. 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 <[email protected]> Fixes: 0ef8047b737d ("x86/static-call: provide a way to do very early static-call updates") Signed-off-by: Juergen Gross <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b61f346 commit 5d16dd1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/linux/static_call.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@
138138
#ifdef CONFIG_HAVE_STATIC_CALL
139139
#include <asm/static_call.h>
140140

141-
extern bool static_call_initialized;
142141
/*
143142
* Either @site or @tramp can be NULL.
144143
*/
@@ -161,6 +160,8 @@ extern void arch_static_call_transform(void *site, void *tramp, void *func, bool
161160

162161
#ifdef CONFIG_HAVE_STATIC_CALL_INLINE
163162

163+
extern bool static_call_initialized;
164+
164165
extern int __init static_call_init(void);
165166

166167
struct static_call_mod {
@@ -224,6 +225,8 @@ extern long __static_call_return0(void);
224225

225226
#elif defined(CONFIG_HAVE_STATIC_CALL)
226227

228+
#define static_call_initialized 0
229+
227230
static inline int static_call_init(void) { return 0; }
228231

229232
#define DEFINE_STATIC_CALL(name, _func) \
@@ -280,6 +283,8 @@ extern long __static_call_return0(void);
280283

281284
#else /* Generic implementation */
282285

286+
#define static_call_initialized 0
287+
283288
static inline int static_call_init(void) { return 0; }
284289

285290
static inline long __static_call_return0(void)

0 commit comments

Comments
 (0)