aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Ishchuk <aishchuk@linux.vnet.ibm.com>2014-11-19 11:17:18 +0100
committerDoug Ledford <dledford@redhat.com>2015-07-29 12:14:01 -0400
commit13de38c439943fe2a61a7787aa8ef925041fc4c3 (patch)
tree4bd2d2bb5d4b1185e374b8e91e8bb0783dfc6288
parent74cdf9aed7dca9e1a66fdab17b7c2a0c3472251d (diff)
downloadlibibverbs-13de38c439943fe2a61a7787aa8ef925041fc4c3.tar.gz
libibverbs: add support for the s390x platform
This patch adds the required platform specific code to allow execution of the libibverbs functions on the s390x platform. Signed-off-by: Alexey Ishchuk <aishchuk@linux.vnet.ibm.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--include/infiniband/arch.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/infiniband/arch.h b/include/infiniband/arch.h
index 88364ce..bc1738a 100644
--- a/include/infiniband/arch.h
+++ b/include/infiniband/arch.h
@@ -115,6 +115,13 @@ static inline uint64_t ntohll(uint64_t x) { return x; }
#define wmb() mb()
#define wc_wmb() wmb()
+#elif defined(__s390x__)
+
+#define mb() { asm volatile("" : : : "memory"); } /* for s390x */
+#define rmb() mb() /* for s390x */
+#define wmb() mb() /* for s390x */
+#define wc_wmb() wmb() /* for s390x */
+
#else
#warning No architecture specific defines found. Using generic implementation.