Skip to content

Commit

Permalink
Remove old compat definitions of wmb/rmb/etc
Browse files Browse the repository at this point in the history
The canonical place for these is infiniband/arch.h, nothing else
should declare them.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
  • Loading branch information
jgunthorpe committed Sep 29, 2016
1 parent 296de90 commit 6771a20
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 54 deletions.
24 changes: 0 additions & 24 deletions libmlx4/src/mlx4.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,6 @@

#include <valgrind/memcheck.h>

#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: "
Expand Down
22 changes: 0 additions & 22 deletions libmlx5/src/mlx5.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,6 @@

#include <valgrind/memcheck.h>

#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
Expand Down
8 changes: 0 additions & 8 deletions libmthca/src/mthca.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@

#include <valgrind/memcheck.h>

#ifndef rmb
# define rmb() mb()
#endif

#ifndef wmb
# define wmb() mb()
#endif

#define HIDDEN __attribute__((visibility ("hidden")))

#define PFX "mthca: "
Expand Down

0 comments on commit 6771a20

Please sign in to comment.