lkml.org 
[lkml]   [2017]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] trace: fix undefined tracing functions build error
Date
When selecting CONFIG_PREEMPTIRQ_EVENTS without CONFIG_DEBUG_PREEMPT,
trace_preempt_(en|dis)able_* names do not get defined. This causes a build
error in function trace_preempt_off (kernel/trace/trace_irqsoff.c) when
CONFIG_PREEMPT_TRACER is enabled.

Similarly, when selecting CONFIG_PREEMPTIRQ_EVENTS and
CONFIG_PROVE_LOCKING, trace_irq_(en|dis)able_* names do not get defined,
although it seems they do not get referenced in that configuration.

Ensure trace_(irq|preempt)_* names are always defined, becoming empty
macros in the cases where they were not defined previously.

Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
---
include/trace/events/preemptirq.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/preemptirq.h b/include/trace/events/preemptirq.h
index f5024c5..9c4eb33 100644
--- a/include/trace/events/preemptirq.h
+++ b/include/trace/events/preemptirq.h
@@ -56,15 +56,18 @@

#include <trace/define_trace.h>

-#else /* !CONFIG_PREEMPTIRQ_EVENTS */
+#endif /* !CONFIG_PREEMPTIRQ_EVENTS */

+#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || defined(CONFIG_PROVE_LOCKING)
#define trace_irq_enable(...)
#define trace_irq_disable(...)
-#define trace_preempt_enable(...)
-#define trace_preempt_disable(...)
#define trace_irq_enable_rcuidle(...)
#define trace_irq_disable_rcuidle(...)
+#endif
+
+#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || !defined(CONFIG_DEBUG_PREEMPT)
+#define trace_preempt_enable(...)
+#define trace_preempt_disable(...)
#define trace_preempt_enable_rcuidle(...)
#define trace_preempt_disable_rcuidle(...)
-
#endif
--
1.9.1
\
 
 \ /
  Last update: 2017-10-26 10:38    [W:2.061 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site