[tip: x86/asm] x86/asm/segment: Use ASM_INPUT_RM in __loadsegment_fs()
From: tip-bot2 for Uros Bizjak
Date: Mon Mar 30 2026 - 03:17:43 EST
The following commit has been merged into the x86/asm branch of tip:
Commit-ID: caf3cb2ef22e4b4ff9f6bb48f71ce30dae663326
Gitweb: https://git.kernel.org/tip/caf3cb2ef22e4b4ff9f6bb48f71ce30dae663326
Author: Uros Bizjak <ubizjak@xxxxxxxxx>
AuthorDate: Mon, 30 Mar 2026 07:57:44 +02:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Mon, 30 Mar 2026 09:10:16 +02:00
x86/asm/segment: Use ASM_INPUT_RM in __loadsegment_fs()
Use the ASM_INPUT_RM macro in __loadsegment_fs() to work around Clang
problems with the "rm" asm constraint. Clang seems to always chose the
memory input, while it is almost always the worst choice.
Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Acked-by: Nathan Chancellor <nathan@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Link: https://patch.msgid.link/20260330055823.5793-3-ubizjak@xxxxxxxxx
---
arch/x86/include/asm/segment.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
index 3fe3a31..0f4283d 100644
--- a/arch/x86/include/asm/segment.h
+++ b/arch/x86/include/asm/segment.h
@@ -335,7 +335,7 @@ static inline void __loadsegment_fs(unsigned short value)
_ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_CLEAR_FS)
- : : "rm" (value) : "memory");
+ : : ASM_INPUT_RM (value) : "memory");
}
/* __loadsegment_gs is intentionally undefined. Use load_gs_index instead. */