diff options
author | Simon Glass <sjg@chromium.org> | 2012-10-10 13:12:53 +0000 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2012-11-28 11:40:03 -0800 |
commit | 8a487a4417221412d1cd23d4e08253fc9413be51 (patch) | |
tree | 853821ae5b83367759d54912cba48fe893b04f6a /arch/x86/include | |
parent | 8abebe3eadb35222a1147078da4010b4cbfe5858 (diff) | |
download | u-boot-imx-8a487a4417221412d1cd23d4e08253fc9413be51.zip u-boot-imx-8a487a4417221412d1cd23d4e08253fc9413be51.tar.gz u-boot-imx-8a487a4417221412d1cd23d4e08253fc9413be51.tar.bz2 |
x86: Add initial memory barrier macros
These are available on other architectures, so add them on x86.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/io.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 9b757d4..b12bdd8 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -234,4 +234,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr) return (phys_addr_t)(vaddr); } +/* + * TODO: The kernel offers some more advanced versions of barriers, it might + * have some advantages to use them instead of the simple one here. + */ +#define dmb() __asm__ __volatile__ ("" : : : "memory") +#define __iormb() dmb() +#define __iowmb() dmb() + #endif |