]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/locking: Use ALT_OUTPUT_SP() for percpu_{,try_}cmpxchg{64,128}_op()
authorUros Bizjak <ubizjak@gmail.com>
Fri, 14 Feb 2025 15:07:46 +0000 (16:07 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 21 Feb 2025 14:56:08 +0000 (15:56 +0100)
commit4087e16b033140cf2ce509ec23503bddec818a16
tree8152aa082d17a37c6f47575870f871b9c41cdcfb
parent0ad2507d5d93f39619fc42372c347d6006b64319
x86/locking: Use ALT_OUTPUT_SP() for percpu_{,try_}cmpxchg{64,128}_op()

percpu_{,try_}cmpxchg{64,128}() macros use CALL instruction inside
asm statement in one of their alternatives. Use ALT_OUTPUT_SP()
macro to add required dependence on %esp register.

ALT_OUTPUT_SP() implements the above dependence by adding
ASM_CALL_CONSTRAINT to its arguments. This constraint should be used
for any inline asm which has a CALL instruction, otherwise the
compiler may schedule the asm before the frame pointer gets set up
by the containing function, causing objtool to print a "call without
frame pointer save/setup" warning.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250214150929.5780-1-ubizjak@gmail.com
arch/x86/include/asm/percpu.h