Import fix from LTSI: 3.4+ RT kernels use CONFIG_PREEMPT_RT_FULL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 15 Oct 2013 12:14:14 +0000 (08:14 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 15 Oct 2013 12:16:14 +0000 (08:16 -0400)
Initial LTSI commit:

From: Paul Gortmaker <paul.gortmaker@windriver.com>
> 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 <Jim.Somerville@windriver.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Merged with kernel version checks for >= 3.4 to support both old and
newer kernels.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-events.c

index 4f30904dc0c922d7c865369387a42c4d860a45c9..ff937089b7e89618eb62f81ae8146223f43e2ba7 100644 (file)
@@ -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)
This page took 0.02755 seconds and 4 git commands to generate.