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:14:14 +0000 (08:14 -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 b7e44221958d1230be181178dc3e90f5ce1990fa..0faff8498df3d61eb972415a4b1c1336ccce20a4 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"
@@ -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)
This page took 0.027332 seconds and 4 git commands to generate.