File libibverbs-s390.patch of Package libibverbs
Cc: alexey_ishchuk@ru.ibm.com
Subject: DAPL support for Linux on System z
s390: Add DAPL support for Linux on System z in libibverbs
Changes required to support the OFED stack on the System z platform. These
changes include:
* mb, rmb, wmb, and wc_wmb macro definitions for the System z platform;
* new Infiniband verb command identifier.
The new Infiniband verb command was added to allow data transfer from user
space applications to infiniband devices on System z.
---
include/infiniband/arch.h | 7 +++++++
include/infiniband/kern-abi.h | 6 ++++--
2 files changed, 11 insertions(+), 2 deletions(-)
Index: libibverbs-1.1.7/include/infiniband/arch.h
===================================================================
--- libibverbs-1.1.7.orig/include/infiniband/arch.h 2014-03-05 10:36:36.000000000 +0100
+++ libibverbs-1.1.7/include/infiniband/arch.h 2014-03-31 14:20:50.479614972 +0200
@@ -115,6 +115,13 @@ static inline uint64_t ntohll(uint64_t x
#define wmb() mb()
#define wc_wmb() wmb()
+#elif defined(__s390x__) || defined(__s390__)
+
+#define mb() asm volatile("" ::: "memory")
+#define rmb() mb()
+#define wmb() mb()
+#define wc_wmb() wmb()
+
#else
#warning No architecture specific defines found. Using generic implementation.
Index: libibverbs-1.1.7/include/infiniband/kern-abi.h
===================================================================
--- libibverbs-1.1.7.orig/include/infiniband/kern-abi.h 2014-03-05 10:36:36.000000000 +0100
+++ libibverbs-1.1.7/include/infiniband/kern-abi.h 2014-03-31 14:20:50.480614949 +0200
@@ -91,7 +91,8 @@ enum {
IB_USER_VERBS_CMD_OPEN_XRCD,
IB_USER_VERBS_CMD_CLOSE_XRCD,
IB_USER_VERBS_CMD_CREATE_XSRQ,
- IB_USER_VERBS_CMD_OPEN_QP
+ IB_USER_VERBS_CMD_OPEN_QP,
+ IB_USER_VERBS_CMD_KWRITE_MMIO=52
};
#define IB_USER_VERBS_CMD_COMMAND_MASK 0xff
@@ -904,7 +905,8 @@ enum {
IB_USER_VERBS_CMD_OPEN_XRCD_V2 = -1,
IB_USER_VERBS_CMD_CLOSE_XRCD_V2 = -1,
IB_USER_VERBS_CMD_CREATE_XSRQ_V2 = -1,
- IB_USER_VERBS_CMD_OPEN_QP_V2 = -1
+ IB_USER_VERBS_CMD_OPEN_QP_V2 = -1,
+ IB_USER_VERBS_CMD_KWRITE_MMIO_V2 = -1
};
struct ibv_modify_srq_v3 {