Added support for MLX4 on RHEL7.6
authorVladimir Sokolovsky <vlad@mellanox.com>
Tue, 27 Aug 2019 20:45:09 +0000 (15:45 -0500)
committerVladimir Sokolovsky <vlad@mellanox.com>
Tue, 27 Aug 2019 20:45:09 +0000 (15:45 -0500)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
config/rdma.m4
include/linux/compat-5.3.h

index d4eb4a4..6721825 100644 (file)
@@ -65,6 +65,22 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if kernel has ktime_get_boottime_ns])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/ktime.h>
+       ],[
+               unsigned long long ns;
+
+               ns = ktime_get_boottime_ns();
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_KTIME_GET_BOOTTIME_NS, 1,
+                         [ktime_get_boottime_ns defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
        AC_MSG_CHECKING([if timekeeping.h has ktime_get_real_ns])
        LB_LINUX_TRY_COMPILE([
                #include <linux/ktime.h>
        AC_MSG_CHECKING([if timekeeping.h has ktime_get_real_ns])
        LB_LINUX_TRY_COMPILE([
                #include <linux/ktime.h>
index e07fc82..7a5c30c 100644 (file)
     } while (0)
 #endif
 
     } while (0)
 #endif
 
+#ifndef HAVE_KTIME_GET_BOOTTIME_NS
+#define ktime_get_boottime_ns ktime_get_boot_ns
+#endif
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)) */
 
 #endif /* LINUX_5_3_COMPAT_H */
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)) */
 
 #endif /* LINUX_5_3_COMPAT_H */