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 17:01:18 +0000 (13:01 -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 4f9509585ece2d2a6ff90230794adfb1962306c0..1c7df4396de272bcf123965499290e7935a33bb1 100644 (file)
@@ -354,7 +354,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(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))
 
 LTTNG_TRACEPOINT_EVENT(
        kvm_async_pf_completed,
index 1afdcd34bc942231cfa58c91a91320c9651a8f70..f98a1925e9419bfa6365743d49ecf6a748d7b306 100644 (file)
                LTTNG_DEBIAN_VERSION_CODE < \
                LTTNG_DEBIAN_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_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 1b2821a19a8b7fde4a315721944d0d66405062bb..d7d18429ba1c1f17d22d35c4ce6ec8484aef422e 100644 (file)
@@ -39,7 +39,8 @@
 #include "percpu-defs.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.027981 seconds and 4 git commands to generate.