[PATCH 02/20] x86/apic: Use named asm operands in native_apic_mem_write()
From: Josh Poimboeuf
Date: Fri Mar 14 2025 - 17:48:14 EST
Use named operands in preparation for removing the operand numbering
restrictions in alternative_io().
Note this includes removing the "0" input constraint and converting its
corresponding output constraint from "=r" to "+r". While at it, do the
same for the memory constraint.
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
arch/x86/include/asm/apic.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index c903d358405d..ecf1b229f09b 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -98,9 +98,9 @@ static inline void native_apic_mem_write(u32 reg, u32 v)
{
volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);
- alternative_io("movl %0, %1", "xchgl %0, %1", X86_BUG_11AP,
- ASM_OUTPUT("=r" (v), "=m" (*addr)),
- ASM_INPUT("0" (v), "m" (*addr)));
+ alternative_io("movl %[val], %[mem]",
+ "xchgl %[val], %[mem]", X86_BUG_11AP,
+ ASM_OUTPUT([val] "+r" (v), [mem] "+m" (*addr)));
}
static inline u32 native_apic_mem_read(u32 reg)
--
2.48.1