libibverbs/libibverbs-1.2.1-arm-revert-generic-implementation.patch

38 lines
1.2 KiB
Diff

From 20e2daec4578c1df10d8b599bf3b525a9b3fc6c3 Mon Sep 17 00:00:00 2001
From: Steve Wise <swise@opengridcomputing.com>
Date: Tue, 7 Jun 2016 07:42:47 -0700
Subject: Fail compiles if no platform specific memory barriers exist
Currently there is a "generic" implementation for the memory barrier
macros in arch.h. These turned out to be insuffient for ARM64 causing
memory corruption problems when doing RDMA operations. So going forward,
fail a compile on a platform w/o platform-specific memory barrier macros.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
---
include/infiniband/arch.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/infiniband/arch.h b/include/infiniband/arch.h
index c31dd0a..e35ecf0 100644
--- a/include/infiniband/arch.h
+++ b/include/infiniband/arch.h
@@ -132,12 +132,7 @@ static inline uint64_t ntohll(uint64_t x) { return x; }
#else
-#warning No architecture specific defines found. Using generic implementation.
-
-#define mb() asm volatile("" ::: "memory")
-#define rmb() mb()
-#define wmb() mb()
-#define wc_wmb() wmb()
+#error No architecture specific memory barrier defines found!
#endif
--
cgit 1.2.3-1.el7