Fix: add RHEL version macros
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 27 May 2015 16:19:01 +0000 (12:19 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 27 May 2015 16:50:31 +0000 (12:50 -0400)
RHEL 7.1 has backported upstream patches that change the kvm.h
tracepoint prototype. Add version check specific to RHEL to handle this
case.

RHEL 7.x has the required fixes backported that allow removing the 3.10
blacklist check for them, so take this into account.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/kvm.h
lttng-kernel-version.h
wrapper/trace-clock.h

index 99d1788a924f3adcd045e5edc5a881555101cf4f..ff3283629a239e8739c92ae1a58fe95eb0c9465e 100644 (file)
@@ -325,7 +325,8 @@ DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_ready,
        TP_ARGS(token, gva)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) \
+       || LTTNG_RHEL_KERNEL_RANGE(3,10,0,7,1, 3,11,0,0,0))
 
 TRACE_EVENT(
        kvm_async_pf_completed,
index 7dbb62b9d15b7d2c42299386d4f2c93de86d70b2..62b82efce3b70c6d119574b0e80084d79e7c7066 100644 (file)
                LTTNG_UBUNTU_VERSION_CODE < \
                LTTNG_UBUNTU_KERNEL_VERSION(a_high, b_high, c_high, d_high))
 
+#define LTTNG_RHEL_KERNEL_VERSION(a, b, c, d, e) \
+       (((a) * (1ULL << 32)) + ((b) << 24) + ((c) << 16) + ((d) << 8) + (e))
+
+#ifdef RHEL_RELEASE_CODE
+#define LTTNG_RHEL_VERSION_CODE \
+       ((LINUX_VERSION_CODE * (1ULL << 16)) + RHEL_RELEASE_CODE)
+#else
+#define LTTNG_RHEL_VERSION_CODE                0
+#endif
+
+#define LTTNG_RHEL_KERNEL_RANGE(a_low, b_low, c_low, d_low, e_low, \
+               a_high, b_high, c_high, d_high, e_high) \
+       (LTTNG_RHEL_VERSION_CODE >= \
+               LTTNG_RHEL_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low) && \
+               LTTNG_RHEL_VERSION_CODE < \
+               LTTNG_RHEL_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high))
+
 #endif /* _LTTNG_KERNEL_VERSION_H */
index 9c0c8067f7b1d959af34c47f396e71e4496d334c..a36140f939c1958263cf7e11ef7611d20dbfe8f9 100644 (file)
@@ -36,7 +36,8 @@
 #include "../lttng-kernel-version.h"
 #include "random.h"
 
-#if LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) || LTTNG_KERNEL_RANGE(3,11,0, 3,11,3)
+#if ((LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) && !LTTNG_RHEL_KERNEL_RANGE(3,10,0,7,0, 3,10,14,0,0)) \
+       || LTTNG_KERNEL_RANGE(3,11,0, 3,11,3))
 #error "Linux kernels 3.10 and 3.11 introduce a deadlock in the timekeeping subsystem. Fixed by commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f \"timekeeping: Fix HRTICK related deadlock from ntp lock changes\" in Linux."
 #endif
 
This page took 0.029095 seconds and 4 git commands to generate.