[U-Boot] [RFC PATCH v2 07/28] ppc: Add initial memory barrier macros

Simon Glass sjg at chromium.org
Sat Jan 7 01:24:42 CET 2012


These are available on other architectures, so add them on ppc.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/powerpc/include/asm/io.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 56ac9fe..d246fd8 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -318,4 +318,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
 #endif
 }
 
+/*
+ * 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
-- 
1.7.3.1



More information about the U-Boot mailing list