Description: Define the barriers for mips and provide a warning message
for archs that are not defined instead of an error. The warning message
was the behavior in previous releases of libibverbs.
Author: Ana Guerrero Lopez <ana@debian.org>

Last-Update: 2016-09-11

--- libibverbs-1.2.1.orig/include/infiniband/arch.h
+++ libibverbs-1.2.1/include/infiniband/arch.h
@@ -130,9 +130,16 @@ static inline uint64_t ntohll(uint64_t x
 #define wmb()	{ asm volatile("dsb st" ::: "memory"); }
 #define wc_wmb() wmb()
 
+#elif defined(__mips__)
+
+#define mb()   { asm volatile("sync" ::: "memory"); }
+#define rmb()  { asm volatile("sync_rmb" ::: "memory"); }
+#define wmb()  { asm volatile("sync_wmb" ::: "memory"); }
+#define wc_wmb() wmb()
+
 #else
 
-#error No architecture specific memory barrier defines found!
+#warning No architecture specific memory barrier defines found!
 
 #endif
 
