Skip to content

Commit

Permalink
x86/static-call: fix 32-bit build
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jgross1 authored and torvalds committed Dec 18, 2024
1 parent aef25be commit 349f008
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/linux/static_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
#ifdef CONFIG_HAVE_STATIC_CALL
#include <asm/static_call.h>

extern int static_call_initialized;
/*
* Either @site or @tramp can be NULL.
*/
Expand All @@ -161,6 +160,8 @@ extern void arch_static_call_transform(void *site, void *tramp, void *func, bool

#ifdef CONFIG_HAVE_STATIC_CALL_INLINE

extern int static_call_initialized;

extern int __init static_call_init(void);

extern void static_call_force_reinit(void);
Expand Down Expand Up @@ -226,6 +227,8 @@ extern long __static_call_return0(void);

#elif defined(CONFIG_HAVE_STATIC_CALL)

#define static_call_initialized 0

static inline int static_call_init(void) { return 0; }

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

#else /* Generic implementation */

#define static_call_initialized 0

static inline int static_call_init(void) { return 0; }

static inline long __static_call_return0(void)
Expand Down

0 comments on commit 349f008

Please sign in to comment.