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:
parent
1a06d2a310
commit
837a136fc7
@ -151,6 +151,11 @@ static inline int flag_is_changeable_p(uint32_t flag)
|
|||||||
return ((f1^f2) & flag) != 0;
|
return ((f1^f2) & flag) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void mfence(void)
|
||||||
|
{
|
||||||
|
__asm__ __volatile__("mfence" : : : "memory");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cpu_enable_paging_pae() - Enable PAE-paging
|
* cpu_enable_paging_pae() - Enable PAE-paging
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user