26 lines
848 B
Diff
26 lines
848 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Arjan van de Ven <arjan@linux.intel.com>
|
|
Date: Sat, 8 Dec 2018 18:21:32 +0000
|
|
Subject: [PATCH] use lfence instead of rep and nop
|
|
|
|
---
|
|
arch/x86/include/asm/processor.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
|
|
index 54f5d54280f6..ee60a1f2dd11 100644
|
|
--- a/arch/x86/include/asm/processor.h
|
|
+++ b/arch/x86/include/asm/processor.h
|
|
@@ -647,7 +647,7 @@ static inline unsigned int cpuid_edx(unsigned int op)
|
|
/* 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
|
|
|