]> git.openfabrics.org - compat-rdma/compat.git/commitdiff
Support RHEL7.2 and SLES12SP1 for QIB in OFED-4.8
authorPawel Schulfer <pawel.schulfer@intel.com>
Tue, 6 Dec 2016 21:15:00 +0000 (13:15 -0800)
committerPawel Schulfer <pawel.schulfer@intel.com>
Tue, 6 Dec 2016 21:15:00 +0000 (13:15 -0800)
Changes included in this patch:
1) Check for write_iter in file_operations structure
2) Check for inode_lock function in fs.h
3) Check for simple_positive function in dcache.h
4) Check for __GFP_RECLAIM in gfp.h

Signed-off-by: Pawel Schulfer <pawel.schulfer@intel.com>
config/rdma.m4

index 266d53a2d6d3d4b27b11d7d88d0d91d93342d95f..fc5f474e1555fbda65a262efcc8d9e5c5fe3431a 100644 (file)
@@ -3840,6 +3840,68 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if struct file_operations has write_iter])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/fs.h>
+       ],[
+               const struct file_operations fo = {
+                       .write_iter = NULL,
+               };
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_FILE_OPS_WRITE_ITER, 1,
+                       [write_iter is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if linux/fs.h has inode_lock])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/fs.h>
+       ],[
+               inode_lock(NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_INODE_LOCK, 1,
+                       [inode_lock is defined in fs.h])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if linux/dcache.h has simple_positive])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/dcache.h>
+       ],[
+               int i = simple_positive(NULL);
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SIMPLE_POSITIVE, 1,
+                       [simple_positive is defined in dcache.h])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
+       AC_MSG_CHECKING([if __GFP_RECLAIM is defined])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/gfp.h>
+       ],[
+               gfp_t rc = __GFP_RECLAIM;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GFP_RECLAIM, 1,
+                       [__GFP_RECLAIM is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
 ])
 #
 # COMPAT_CONFIG_HEADERS