x86: Add an mfence macro

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>
This commit is contained in:
Simon Glass 2015-04-28 20:25:14 -06:00
parent 1a06d2a310
commit 837a136fc7

View File

@ -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
*