The following commit has been merged into the x86/asm branch of tip: Commit-ID: 784af8f453fddec902639f42e2456f7fb5199450 Gitweb: https://git.kernel.org/tip/784af8f453fddec902639f42e2456f7fb5199450 Author: Uros Bizjak <ubizjak@xxxxxxxxx> AuthorDate: Mon, 03 Mar 2025 16:54:23 +01:00 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitterDate: Tue, 04 Mar 2025 20:12:40 +01:00 x86/irq/32: Add ASM_CALL_CONSTRAINT to inline asm using CALL_NOSPEC 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@xxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Andy Lutomirski <luto@xxxxxxxxxx> Cc: Brian Gerst <brgerst@xxxxxxxxx> Cc: H. Peter Anvin <hpa@xxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20250303155446.112769-3-ubizjak@xxxxxxxxx --- arch/x86/kernel/irq_32.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index eab4580..f351fa1 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c @@ -59,6 +59,7 @@ static void call_on_stack(void *func, void *stack) "movl %[sp], %%esp" : [sp] "+b" (stack) : [thunk_target] "D" (func) + COMMA(ASM_CALL_CONSTRAINT) : "memory", "cc", "edx", "ecx", "eax"); } @@ -98,6 +99,7 @@ static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc) "movl %[sp], %%esp" : "+a" (desc), [sp] "+b" (isp) : [thunk_target] "D" (desc->handle_irq) + COMMA(ASM_CALL_CONSTRAINT) : "memory", "cc", "edx", "ecx"); return 1; }
![]() |