[PATCH 3/4] powerpc/fsl: 85xx: add mbar()

Vivek Mahajan vivek.mahajan at freescale.com
Thu Sep 24 19:10:25 EST 2009


Adds e500/85xx based memory barrier

Signed-off-by: Vivek Mahajan <vivek.mahajan at freescale.com>
---
Resending it to linuxppc-dev at ozlabs.org

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

diff --git a/arch/powerpc/include/asm/synch.h b/arch/powerpc/include/asm/synch.h
index 28f6ddb..8298089 100644
--- a/arch/powerpc/include/asm/synch.h
+++ b/arch/powerpc/include/asm/synch.h
@@ -23,6 +23,11 @@ static inline void isync(void)
 {
 	__asm__ __volatile__ ("isync" : : : "memory");
 }
+
+static inline void mbar(int mo)
+{
+	__asm__ __volatile__ ("mbar %0" : : "i" (mo) : "memory");
+}
 #endif /* __ASSEMBLY__ */
 
 #if defined(__powerpc64__)
-- 
1.5.6.5



More information about the Linuxppc-dev mailing list