projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a06d2a
)
x86: Add an mfence macro
author
Simon Glass
<sjg@chromium.org>
Wed, 29 Apr 2015 02:25:14 +0000
(20:25 -0600)
committer
Simon Glass
<sjg@chromium.org>
Thu, 30 Apr 2015 03:02:34 +0000
(21:02 -0600)
Provide access to this x86 instruction from C code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/include/asm/cpu.h
patch
|
blob
|
history
diff --git
a/arch/x86/include/asm/cpu.h
b/arch/x86/include/asm/cpu.h
index c8392915f1dbe87ce741946970682334281d1c85..08284ee29530c46a3d33ed52956b4f661113de01 100644
(file)
--- a/
arch/x86/include/asm/cpu.h
+++ b/
arch/x86/include/asm/cpu.h
@@
-151,6
+151,11
@@
static inline int flag_is_changeable_p(uint32_t flag)
return ((f1^f2) & flag) != 0;
}
+static inline void mfence(void)
+{
+ __asm__ __volatile__("mfence" : : : "memory");
+}
+
/**
* cpu_enable_paging_pae() - Enable PAE-paging
*