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 <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Anton Ivanov <[email protected]> Cc: Johannes Berg <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: David Laight <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 9c88156 commit 304c9f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)