[ofa-general] [PATCH] libibverbs: Replace eieio with sync for PPC wmb()
Shirley Ma
mashirle at us.ibm.com
Tue Jul 22 15:06:50 PDT 2008
Hello Roland,
We have found that the wmb() for PPC was incorrect defined as eieio
instruction in libibverbs. Instruction eieio applies either in a pure
I/O memory or a pure system memory. In the 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 at us.ibm.com>
-------
include/infiniband/arch.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/infiniband/arch.h b/include/infiniband/arch.h
index 6931bfc..d3e356f 100644
--- a/include/infiniband/arch.h
+++ b/include/infiniband/arch.h
@@ -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__)
More information about the general
mailing list