[<prev] [next>] [day] [month] [year] [list]
Message-ID: <174108458405.14745.4864877018394987266.tip-bot2@tip-bot2>
Date: Tue, 04 Mar 2025 10:36:24 -0000
From: "tip-bot2 for Josh Poimboeuf" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Josh Poimboeuf <jpoimboe@...nel.org>, Ingo Molnar <mingo@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Brian Gerst <brgerst@...il.com>, "H. Peter Anvin" <hpa@...or.com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: [tip: x86/asm] x86/asm: Make ASM_CALL_CONSTRAINT conditional on frame
pointers
The following commit has been merged into the x86/asm branch of tip:
Commit-ID: 05844663b4fcf22bb3a1494615ae3f25852c9abc
Gitweb: https://git.kernel.org/tip/05844663b4fcf22bb3a1494615ae3f25852c9abc
Author: Josh Poimboeuf <jpoimboe@...nel.org>
AuthorDate: Sun, 02 Mar 2025 17:21:03 -08:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Tue, 04 Mar 2025 11:21:40 +01:00
x86/asm: Make ASM_CALL_CONSTRAINT conditional on frame pointers
With frame pointers enabled, ASM_CALL_CONSTRAINT is used in an inline
asm statement with a call instruction to force the compiler to set up
the frame pointer before doing the call.
Without frame pointers, no such constraint is needed. Make it
conditional on frame pointers.
Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Brian Gerst <brgerst@...il.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: linux-kernel@...r.kernel.org
---
arch/x86/include/asm/asm.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h
index 0d268e6..f1db9e8 100644
--- a/arch/x86/include/asm/asm.h
+++ b/arch/x86/include/asm/asm.h
@@ -232,7 +232,11 @@ register unsigned long current_stack_pointer asm(_ASM_SP);
* gets set up by the containing function. If you forget to do this, objtool
* may print a "call without frame pointer save/setup" warning.
*/
+#ifdef CONFIG_UNWINDER_FRAME_POINTER
#define ASM_CALL_CONSTRAINT "r" (__builtin_frame_address(0))
+#else
+#define ASM_CALL_CONSTRAINT
+#endif
#endif /* __ASSEMBLY__ */
Powered by blists - more mailing lists