Re: [PATCH RFC x86/asm] Make serialize __always_inline
"H. Peter Anvin" <[email protected]>
| Newsgroups | org.kernel.vger.linux-toolchains |
|---|---|
| Message-ID | <[email protected]> |
On January 18, 2025 10:13:38 AM PST, "Paul E. McKenney" <[email protected]> wrote: >Recent mainline has been getting objtool complaints: > >vmlinux.o: warning: objtool: __static_call_update_early+0x33: call to serialize() leaves .noinstr.text section > >Bisection converged to a nonsensical commit, and reverting that commit >did not get rid of the complaints. > >So fix this by inspection, marking serialize() __always_inline to match >the call from sync_core(). > >This silences the objtool complaint, but of course might not be the >proper patch. > >Signed-off-by: Paul E. McKenney <[email protected]> >Cc: Thomas Gleixner <[email protected]> >Cc: Ingo Molnar <[email protected]> >Cc: Borislav Petkov <[email protected]> >Cc: Dave Hansen <[email protected]> >Cc: "H. Peter Anvin" <[email protected]> >Cc: Josh Poimboeuf <[email protected]> >Cc: Peter Zijlstra <[email protected]> >Cc: Nathan Chancellor <[email protected]> >Cc: <[email protected]> >Cc: <[email protected]> > >diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h >index aec6e2d3aa1d5..98bfc097389c4 100644 >--- a/arch/x86/include/asm/special_insns.h >+++ b/arch/x86/include/asm/special_insns.h >@@ -217,7 +217,7 @@ static inline int write_user_shstk_64(u64 __user *addr, u64 val) > > #define nop() asm volatile ("nop") > >-static inline void serialize(void) >+static __always_inline void serialize(void) > { > /* Instruction opcode for SERIALIZE; supported in binutils >= 2.35. */ > asm volatile(".byte 0xf, 0x1, 0xe8" ::: "memory"); It absolutely is the right thing! Reviewed-by: H. Peter Anvin (Intel) <[email protected]>