@@ -278,6 +278,14 @@ check_type_size("long" SIZEOF_LONG BUILTIN_TYPES_ONLY LANGUAGE C)
include(RDMA_LinuxHeaders)
+# Determine if this arch supports cache coherent DMA. This isn't really an
+# arch specific property, but for our purposes arches that do not support it
+# also do not define wmb/etc which breaks our compile.
+CHECK_C_SOURCE_COMPILES("
+#include \"${CMAKE_CURRENT_SOURCE_DIR}/libibverbs/arch.h\"
+ int main(int argc,const char *argv[]) {return 0;}"
+ HAVE_COHERENT_DMA)
+
#-------------------------
# Apply fixups
@@ -358,6 +366,7 @@ add_subdirectory(librdmacm/man)
add_subdirectory(libibcm)
# Providers
+if (HAVE_COHERENT_DMA)
add_subdirectory(providers/cxgb3)
add_subdirectory(providers/cxgb4)
add_subdirectory(providers/hfi1verbs)
@@ -372,6 +381,7 @@ add_subdirectory(providers/ocrdma)
add_subdirectory(providers/qedr)
add_subdirectory(providers/rxe)
add_subdirectory(providers/rxe/man)
+endif()
# Binaries
add_subdirectory(ibacm)
@@ -396,6 +406,9 @@ message(STATUS "Missing Optional Items:")
if (NOT HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE)
message(STATUS " Compiler attribute always_inline NOT supported")
endif()
+if (NOT HAVE_COHERENT_DMA)
+ message(STATUS " Architecture NOT able to do coherent DMA (check libibverbs/arch.h) some providers disabled!")
+endif()
if (NOT HAVE_VALGRIND_MEMCHECK)
message(STATUS " Valgrind memcheck.h NOT enabled")
endif()
If not then disable compiling providers that require coherent DMA. Currently this is all of them. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+)