summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2024-12-18 09:02:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-19 18:06:14 +0100
commit20ad30bed789df1c75a4dd42e6c64309d0304d94 (patch)
tree9609977a37ebad27fdc4765eb7544ef8ccd4f681
parente7c1fcdda47b0633c4b2b5d0db73d442ac35c071 (diff)
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 <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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--include/linux/static_call.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/static_call.h b/include/linux/static_call.h
index 022842436880..c95c1b83e27a 100644
--- a/include/linux/static_call.h
+++ b/include/linux/static_call.h
@@ -100,7 +100,6 @@
#ifdef CONFIG_HAVE_STATIC_CALL
#include <asm/static_call.h>
-extern bool static_call_initialized;
/*
* Either @site or @tramp can be NULL.
*/
@@ -121,6 +120,8 @@ extern void arch_static_call_transform(void *site, void *tramp, void *func, bool
#ifdef CONFIG_HAVE_STATIC_CALL_INLINE
+extern bool static_call_initialized;
+
extern int __init static_call_init(void);
struct static_call_mod {
@@ -184,6 +185,8 @@ extern int static_call_text_reserved(void *start, void *end);
#elif defined(CONFIG_HAVE_STATIC_CALL)
+#define static_call_initialized 0
+
static inline int static_call_init(void) { return 0; }
struct static_call_key {
@@ -235,6 +238,8 @@ static inline int static_call_text_reserved(void *start, void *end)
#else /* Generic implementation */
+#define static_call_initialized 0
+
static inline int static_call_init(void) { return 0; }
struct static_call_key {