]> git.openfabrics.org - ~aditr/compat.git/commitdiff
Support rdmavt on RHEL7.2 and SLES12 in OFED-4.8
authorPawel Schulfer <pawel.schulfer@intel.com>
Tue, 17 Jan 2017 14:36:27 +0000 (06:36 -0800)
committerPawel Schulfer <pschulfer@flatbed>
Wed, 18 Jan 2017 17:10:18 +0000 (09:10 -0800)
Changes included in this patch:
1) Check for MIN_NICE in prio.h

Signed-off-by: Pawel Schulfer <pawel.schulfer@intel.com>
config/rdma.m4
include/linux/compat-3.11.h
include/linux/compat-3.13.h
include/linux/sched/prio.h [new file with mode: 0644]

index a1db9ba8fa55dcc360294fa3eb986cf600640637..5c3e365e5282adb1e67d8cda5a349fe383aaca28 100644 (file)
@@ -4051,6 +4051,21 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
                AC_MSG_RESULT(no)
        ])
 
+       AC_MSG_CHECKING([if MIN_NICE is defined in prio.h])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/sched/prio.h>
+       ],[
+               long nice = MIN_NICE;
+
+               return 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_MIN_NICE, 1,
+                       [MIN_NICE is defined in prio.h])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+
 ])
 #
 # COMPAT_CONFIG_HEADERS
index 193fa3e4002f2ccefba474bfd8286f7a6092e767..7dec516e92899e5b4c3825476fd0014001f033e4 100644 (file)
@@ -5,6 +5,7 @@
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0))
 #include <linux/netdevice.h>
+#include <linux/sched/prio.h>
 
 #ifndef AF_IB
 #define AF_IB          27      /* Native InfiniBand address    */
index 88ad581315798f33270a882ae9133b8e4df325f5..8eecb37fe156464b654d9318bd5540ecfebca0e9 100644 (file)
@@ -6,6 +6,8 @@
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0))
 
+#include <linux/sched/prio.h>
+
 #ifndef HAVE_REINIT_COMPLETION
 #define HAVE_REINIT_COMPLETION
 
diff --git a/include/linux/sched/prio.h b/include/linux/sched/prio.h
new file mode 100644 (file)
index 0000000..96ff8fa
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef _COMPAT_LINUX_PRIO_H
+#define _COMPAT_LINUX_PRIO_H 1
+
+#include "../../compat/config.h"
+
+#ifdef HAVE_MIN_NICE
+#include_next <linux/sched/prio.h>
+#else
+#define MAX_NICE        19
+#define MIN_NICE        -20
+#define NICE_WIDTH      (MAX_NICE - MIN_NICE + 1)
+#endif /* HAVE_MIN_NICE */
+#endif /* _COMPAT_LINUX_PRIO_H */
+