login
Header Space

 
 

[PATCH -rt 6/6] Compile fix for PREEMPT_TIMING on and IRQSOFF_TIMING off

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <tglx@...>, <mingo@...>
Cc: <linux-rt-users@...>, <linux-kernel@...>
Date: Friday, July 13, 2007 - 1:52 pm

The per-cpu trace_cpu_idle variable is used when timing *either*
IRQs-off or preempt sections.

---
 kernel/latency_trace.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: linux-2.6/kernel/latency_trace.c
===================================================================
--- linux-2.6.orig/kernel/latency_trace.c
+++ linux-2.6/kernel/latency_trace.c
@@ -85,9 +85,13 @@ static inline int DEBUG_WARN_ON(int cond
 }
 #endif
 
+#if defined(CONFIG_CRITICAL_IRQSOFF_TIMING) || \
+    defined(CONFIG_CRITICAL_PREEMPT_TIMING)
+   static DEFINE_PER_CPU(int, trace_cpu_idle);
+#endif
+
 #ifdef CONFIG_CRITICAL_IRQSOFF_TIMING
 # ifdef CONFIG_CRITICAL_PREEMPT_TIMING
-   static DEFINE_PER_CPU(int, trace_cpu_idle);
 #  define irqs_off_preempt_count() (preempt_count() && !__get_cpu_var(trace_cpu_idle))
 # else
 #  define irqs_off_preempt_count() 0

--
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -rt 6/6] Compile fix for PREEMPT_TIMING on and IRQSOF..., Kevin Hilman, (Fri Jul 13, 1:52 pm)
Re: [PATCH -rt 6/6] Compile fix for PREEMPT_TIMING on and IR..., Sven-Thorsten Dietrich, (Fri Jul 13, 10:08 pm)
Re: [PATCH -rt 6/6] Compile fix for PREEMPT_TIMING on and IR..., Sven-Thorsten Dietrich, (Fri Jul 13, 5:11 pm)
speck-geostationary