patch-2.2.0-pre2 linux/include/asm-ppc/system.h

Next file: linux/include/asm-ppc/termios.h
Previous file: linux/include/asm-ppc/spinlock.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre1/linux/include/asm-ppc/system.h linux/include/asm-ppc/system.h
@@ -5,7 +5,15 @@
 #include <asm/processor.h>
 #include <asm/atomic.h>
 
+/*
+ * Memory barrier.
+ * The sync instruction guarantees that all memory accesses initiated
+ * by this processor have been performed (with respect to all other
+ * mechanisms that access memory).
+ */
 #define mb()  __asm__ __volatile__ ("sync" : : : "memory")
+#define rmb()  __asm__ __volatile__ ("sync" : : : "memory")
+#define wmb()  __asm__ __volatile__ ("sync" : : : "memory")
 
 #define __save_flags(flags)	({\
 	__asm__ __volatile__ ("mfmsr %0" : "=r" ((flags)) : : "memory"); })

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov