]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
um/asm: Replace "REP; NOP" with PAUSE mnemonic
authorUros Bizjak <ubizjak@gmail.com>
Fri, 18 Apr 2025 08:33:59 +0000 (10:33 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 5 May 2025 08:26:34 +0000 (10:26 +0200)
Current minimum required version of binutils is 2.25,
which supports PAUSE instruction mnemonic.

Replace "REP; NOP" with this proper mnemonic.

No functional change intended.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: David Laight <david.laight.linux@gmail.com>
Link: https://patch.msgid.link/20250418083436.133148-2-ubizjak@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/x86/um/asm/processor.h

index d50549e0089c0afa4d0924a3a324feb4325bae98..e222d2ae28fd77abaef53664805547670155155e 100644 (file)
 
 #include <asm/user.h>
 
-/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
+/* PAUSE is a good thing to insert into busy-wait loops. */
 static __always_inline void native_pause(void)
 {
-       __asm__ __volatile__("rep;nop": : :"memory");
+       __asm__ __volatile__("pause": : :"memory");
 }
 
 static __always_inline void cpu_relax(void)