From 9153ad231edfa178b83bb4c81891b7b812158b08 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Thu, 7 Mar 2019 14:58:00 -0500 Subject: [PATCH] Move timekeeping blacklisting to a header file Signed-off-by: Jonathan Rajotte Signed-off-by: Mathieu Desnoyers --- blacklist/timekeeping.h | 20 ++++++++++++++++++++ wrapper/trace-clock.h | 6 +----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 blacklist/timekeeping.h diff --git a/blacklist/timekeeping.h b/blacklist/timekeeping.h new file mode 100644 index 00000000..f9405ea9 --- /dev/null +++ b/blacklist/timekeeping.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) + * + * blacklist/timekeeping.h + * + * Blacklist of kernel for buggy timekeeping implementation. + * + * Copyright (C) 2019 Jonathan Rajotte-Julien + */ + +#ifndef _LTTNG_BLACKLIST_TIMEKEEPING_H +#define _LTTNG_BLACKLIST_TIMEKEEPING_H + +#include + +#if ((LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) && !LTTNG_RHEL_KERNEL_RANGE(3,10,0,123,0,0, 3,10,14,0,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 + +#endif /* _LTTNG_BLACKLIST_TIMEKEEPING_H */ diff --git a/wrapper/trace-clock.h b/wrapper/trace-clock.h index a98f034e..9f4e366a 100644 --- a/wrapper/trace-clock.h +++ b/wrapper/trace-clock.h @@ -27,11 +27,7 @@ #include #include #include - -#if ((LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) && !LTTNG_RHEL_KERNEL_RANGE(3,10,0,123,0,0, 3,10,14,0,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 +#include extern struct lttng_trace_clock *lttng_trace_clock; -- 2.34.1