diff options
author | Philip Oberfichtner <pro@denx.de> | 2024-08-02 11:25:35 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-09-03 09:12:00 -0600 |
commit | 3eb7f46a3c40b59aa6f73c3937049421514cca34 (patch) | |
tree | f889a15b0225c99d706562f58bfe02f191811b74 /arch/x86/include/asm/io.h | |
parent | a70d991212c9684e09ed80ece69ce1ff7bfd9f08 (diff) |
x86: provide mb() macro
Implement a x86 memory barrier mb(). Furthermore, remove the previously
used mfence() function, which does the same thing.
The mb() macro is now equivalent to Linux (v6.9):
linux/arch/x86/include/asm/barrier.h
Signed-off-by: Philip Oberfichtner <pro@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/include/asm/io.h')
-rw-r--r-- | arch/x86/include/asm/io.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index c6d90eb794a..1390193f09c 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -240,6 +240,7 @@ static inline void sync(void) * have some advantages to use them instead of the simple one here. */ #define dmb() __asm__ __volatile__ ("" : : : "memory") +#define mb() __asm__ __volatile__ ("mfence" : : : "memory") #define __iormb() dmb() #define __iowmb() dmb() |