From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Sat, 8 Dec 2018 18:21:32 +0000 Subject: [PATCH] use lfence instead of rep and nop --- arch/x86/include/asm/vdso/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/vdso/processor.h b/arch/x86/include/asm/vdso/processor.h index 57b1a7034c64..e2c45674f989 100644 --- a/arch/x86/include/asm/vdso/processor.h +++ b/arch/x86/include/asm/vdso/processor.h @@ -10,7 +10,7 @@ /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ static __always_inline void rep_nop(void) { - asm volatile("rep; nop" ::: "memory"); + asm volatile("lfence" ::: "memory"); } static __always_inline void cpu_relax(void) -- https://clearlinux.org