Skip to content

Commit 304c9f7

Browse files
ubizjakjmberg-intel
authored andcommitted
um/asm: Replace "REP; NOP" with PAUSE mnemonic
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>
1 parent 9c88156 commit 304c9f7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/x86/um/asm/processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121

2222
#include <asm/user.h>
2323

24-
/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
24+
/* PAUSE is a good thing to insert into busy-wait loops. */
2525
static __always_inline void native_pause(void)
2626
{
27-
__asm__ __volatile__("rep;nop": : :"memory");
27+
__asm__ __volatile__("pause": : :"memory");
2828
}
2929

3030
static __always_inline void cpu_relax(void)

0 commit comments

Comments
 (0)