Skip to content

Commit e68cbbe

Browse files
jgross1gregkh
authored andcommitted
x86/static-call: fix 32-bit build
commit 349f008 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: 0ef8047 ("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 44a7b04 commit e68cbbe

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 int 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 int static_call_initialized;
164+
164165
extern int __init static_call_init(void);
165166

166167
extern void static_call_force_reinit(void);
@@ -226,6 +227,8 @@ extern long __static_call_return0(void);
226227

227228
#elif defined(CONFIG_HAVE_STATIC_CALL)
228229

230+
#define static_call_initialized 0
231+
229232
static inline int static_call_init(void) { return 0; }
230233

231234
#define DEFINE_STATIC_CALL(name, _func) \
@@ -282,6 +285,8 @@ extern long __static_call_return0(void);
282285

283286
#else /* Generic implementation */
284287

288+
#define static_call_initialized 0
289+
285290
static inline int static_call_init(void) { return 0; }
286291

287292
static inline long __static_call_return0(void)

0 commit comments

Comments
 (0)