From: Mathieu Desnoyers Date: Tue, 15 Oct 2013 12:14:14 +0000 (-0400) Subject: Import fix from LTSI: 3.4+ RT kernels use CONFIG_PREEMPT_RT_FULL X-Git-Tag: v2.4.0-rc1~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b8590f409425c30491f1c25e16ea5f156b0e605b;p=lttng-modules.git Import fix from LTSI: 3.4+ RT kernels use CONFIG_PREEMPT_RT_FULL Initial LTSI commit: From: Paul Gortmaker > fix reference to obsolete RT Kconfig variable. > > The preempt-rt patches no longer use CONFIG_PREEMPT_RT in > the 3.4 (and newer) versions. So even though LTSI doesn't > include RT, having this define present can lead to an easy > to overlook bug for anyone who does try to layer RT onto > the LTSI baseline. > > Update it to use the currently used define name by RT. > > Reported-by: Jim Somerville > Signed-off-by: Paul Gortmaker Merged with kernel version checks for >= 3.4 to support both old and newer kernels. Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-events.c b/lttng-events.c index b7e44221..0faff849 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -31,6 +31,7 @@ #include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ #include "wrapper/random.h" #include "wrapper/tracepoint.h" +#include "lttng-kernel-version.h" #include "lttng-events.h" #include "lttng-tracer.h" #include "lttng-abi-old.h" @@ -60,9 +61,15 @@ void _lttng_metadata_channel_hangup(struct lttng_metadata_stream *stream); void synchronize_trace(void) { synchronize_sched(); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) +#ifdef CONFIG_PREEMPT_RT_FULL + synchronize_rcu(); +#endif +#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ #ifdef CONFIG_PREEMPT_RT synchronize_rcu(); #endif +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ } struct lttng_session *lttng_session_create(void)