From 6771a2051ea5efd30e142866f722d2dae6f565a7 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Tue, 6 Sep 2016 20:27:58 -0600 Subject: [PATCH] Remove old compat definitions of wmb/rmb/etc The canonical place for these is infiniband/arch.h, nothing else should declare them. Signed-off-by: Jason Gunthorpe --- libmlx4/src/mlx4.h | 24 ------------------------ libmlx5/src/mlx5.h | 22 ---------------------- libmthca/src/mthca.h | 8 -------- 3 files changed, 54 deletions(-) diff --git a/libmlx4/src/mlx4.h b/libmlx4/src/mlx4.h index 4551141d2..1855cfbcb 100644 --- a/libmlx4/src/mlx4.h +++ b/libmlx4/src/mlx4.h @@ -49,30 +49,6 @@ #include -#ifndef rmb -# define rmb() mb() -#endif - -#ifndef wmb -# define wmb() mb() -#endif - -#ifndef wc_wmb - -#if defined(__i386__) -#define wc_wmb() asm volatile("lock; addl $0,0(%%esp) " ::: "memory") -#elif defined(__x86_64__) -#define wc_wmb() asm volatile("sfence" ::: "memory") -#elif defined(__ia64__) -#define wc_wmb() asm volatile("fwb" ::: "memory") -#elif defined(__s390x__) -#define wc_wmb { asm volatile("" : : : "memory") } -#else -#define wc_wmb() wmb() -#endif - -#endif - #define HIDDEN __attribute__((visibility ("hidden"))) #define PFX "mlx4: " diff --git a/libmlx5/src/mlx5.h b/libmlx5/src/mlx5.h index aa8b6fece..c209a7964 100644 --- a/libmlx5/src/mlx5.h +++ b/libmlx5/src/mlx5.h @@ -54,28 +54,6 @@ #include -#ifndef rmb -# define rmb() mb() -#endif - -#ifndef wmb -# define wmb() mb() -#endif - -#ifndef wc_wmb - -#if defined(__i386__) -#define wc_wmb() asm volatile("lock; addl $0, 0(%%esp) " ::: "memory") -#elif defined(__x86_64__) -#define wc_wmb() asm volatile("sfence" ::: "memory") -#elif defined(__ia64__) -#define wc_wmb() asm volatile("fwb" ::: "memory") -#else -#define wc_wmb() wmb() -#endif - -#endif - #define HIDDEN __attribute__((visibility("hidden"))) #ifdef HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE diff --git a/libmthca/src/mthca.h b/libmthca/src/mthca.h index 18d522913..da53010ce 100644 --- a/libmthca/src/mthca.h +++ b/libmthca/src/mthca.h @@ -41,14 +41,6 @@ #include -#ifndef rmb -# define rmb() mb() -#endif - -#ifndef wmb -# define wmb() mb() -#endif - #define HIDDEN __attribute__((visibility ("hidden"))) #define PFX "mthca: "