From: Peter Zijlstra <peterz@infradead.org>
To: Juergen Gross <jgross@suse.com>
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
Josh Poimboeuf <jpoimboe@kernel.org>,
Jason Baron <jbaron@akamai.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ard Biesheuvel <ardb@kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] x86/static-call: fix 32-bit build
Date: Wed, 18 Dec 2024 10:47:05 +0100 [thread overview]
Message-ID: <20241218094705.GD2484@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20241218080228.9742-1-jgross@suse.com>
On Wed, Dec 18, 2024 at 09:02:28AM +0100, Juergen Gross wrote:
> 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>
Works for me -- I seem to have missed those patches landing, and I'm
assuming this patch is going to go along with them others that introduce
the problem.
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> include/linux/static_call.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/static_call.h b/include/linux/static_call.h
> index 785980af8972..78a77a4ae0ea 100644
> --- a/include/linux/static_call.h
> +++ b/include/linux/static_call.h
> @@ -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.
> */
> @@ -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);
> @@ -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) \
> @@ -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)
> --
> 2.43.0
>
>
prev parent reply other threads:[~2024-12-18 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 8:02 [PATCH] x86/static-call: fix 32-bit build Juergen Gross
2024-12-18 9:43 ` [tip: x86/urgent] x86/static-call: Fix " tip-bot2 for Juergen Gross
2024-12-18 9:47 ` Peter Zijlstra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241218094705.GD2484@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ardb@kernel.org \
--cc=jbaron@akamai.com \
--cc=jgross@suse.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.