[ofa-general] [PATCH] libibverbs: Replace eieio with sync for PPC wmb()
Shirley Ma
mashirle at us.ibm.com
Wed Aug 20 07:09:46 PDT 2008
Roland,
Have you had time reviewed below patch for libibverbs yet?
Thanks
Shirley
On Tue, 2008-07-22 at 15:06 -0700, Shirley Ma wrote:
> 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__)
>
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list