aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/boot/main.c
diff options
context:
space:
mode:
authorUros Bizjak <[email protected]>2024-03-19 11:40:13 +0100
committerIngo Molnar <[email protected]>2024-03-19 13:15:35 +0100
commit41cd2e1ee96e56401a18dbce6f42f0bdaebcbf3b (patch)
treed79b359d643c96c0cb45eecef82fc6bc001a4f7a /arch/x86/boot/main.c
parenta3ff53167cef2b5c6c8948246172d6f9279f037f (diff)
x86/asm: Use %c/%n instead of %P operand modifier in asm templates
The "P" asm operand modifier is a x86 target-specific modifier. When used with a constant, the "P" modifier emits "cst" instead of "$cst". This property is currently used to emit the bare constant without all syntax-specific prefixes. The generic "c" resp. "n" operand modifier should be used instead. No functional changes intended. Signed-off-by: Uros Bizjak <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/x86/boot/main.c')
-rw-r--r--arch/x86/boot/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c
index c4ea5258ab55..9049f390d834 100644
--- a/arch/x86/boot/main.c
+++ b/arch/x86/boot/main.c
@@ -119,8 +119,8 @@ static void init_heap(void)
char *stack_end;
if (boot_params.hdr.loadflags & CAN_USE_HEAP) {
- asm("leal %P1(%%esp),%0"
- : "=r" (stack_end) : "i" (-STACK_SIZE));
+ asm("leal %n1(%%esp),%0"
+ : "=r" (stack_end) : "i" (STACK_SIZE));
heap_end = (char *)
((size_t)boot_params.hdr.heap_end_ptr + 0x200);