]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Implement PPC wmb() with sync instead of eieio
authorShirley Ma <mashirle@us.ibm.com>
Tue, 22 Jul 2008 22:06:50 +0000 (15:06 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 20 Aug 2008 16:35:56 +0000 (09:35 -0700)
wmb() for PPC was incorrect defined as an eieio instruction in
libibverbs.  eieio only orders pure I/O memory or a pure system memory
accesses.  In a situation where the device drivers use the d_map
kernel services to share a portion of system memory with an I/O
adapter, we need to use sync() instead. See below link for reference:

http://www.ibm.com/developerworks/eserver/articles/powerpc.html

Signed-off-by: Shirley Ma <xma@us.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
include/infiniband/arch.h

index 6931bfc521703295ae514acffeb907e984c24533..88364ce5a2f39b33bea4268d0498d77f0c4ebd12 100644 (file)
@@ -98,7 +98,7 @@ static inline uint64_t ntohll(uint64_t x) { return x; }
 
 #define mb()    asm volatile("sync" ::: "memory")
 #define rmb()   mb()
-#define wmb()   asm volatile("eieio" ::: "memory")
+#define wmb()   mb()
 #define wc_wmb() wmb()
 
 #elif defined(__sparc_v9__)