From 9e46f0b8ab12cd29d07ef0f6e46989790cebb511 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 15 Oct 2013 08:14:14 -0400 Subject: [PATCH] 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 --- lttng-events.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lttng-events.c b/lttng-events.c index 4f30904d..ff937089 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" @@ -53,9 +54,15 @@ int _lttng_session_metadata_statedump(struct lttng_session *session); 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) -- 2.34.1