diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-25 11:13:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-09-13 05:11:52 -0400 |
commit | 5389f6fad27019f2ba78f1b332f719ec05f12a42 (patch) | |
tree | 01b9511a75c147808f48a7f4408bf2e35b12623d /kernel/trace/trace.c | |
parent | 740969f91e950b64a18fdd0a25164cdee042abf0 (diff) |
locking, tracing: Annotate tracing locks as raw
The tracing locks can be taken in atomic context and therefore
cannot be preempted on -rt - annotate it.
In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index e5df02c69b1d..0c8bdeeb358b 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -341,7 +341,7 @@ unsigned long trace_flags = TRACE_ITER_PRINT_PARENT | TRACE_ITER_PRINTK | | |||
341 | TRACE_ITER_GRAPH_TIME | TRACE_ITER_RECORD_CMD | TRACE_ITER_OVERWRITE; | 341 | TRACE_ITER_GRAPH_TIME | TRACE_ITER_RECORD_CMD | TRACE_ITER_OVERWRITE; |
342 | 342 | ||
343 | static int trace_stop_count; | 343 | static int trace_stop_count; |
344 | static DEFINE_SPINLOCK(tracing_start_lock); | 344 | static DEFINE_RAW_SPINLOCK(tracing_start_lock); |
345 | 345 | ||
346 | static void wakeup_work_handler(struct work_struct *work) | 346 | static void wakeup_work_handler(struct work_struct *work) |
347 | { | 347 | { |
@@ -960,7 +960,7 @@ void tracing_start(void) | |||
960 | if (tracing_disabled) | 960 | if (tracing_disabled) |
961 | return; | 961 | return; |
962 | 962 | ||
963 | spin_lock_irqsave(&tracing_start_lock, flags); | 963 | raw_spin_lock_irqsave(&tracing_start_lock, flags); |
964 | if (--trace_stop_count) { | 964 | if (--trace_stop_count) { |
965 | if (trace_stop_count < 0) { | 965 | if (trace_stop_count < 0) { |
966 | /* Someone screwed up their debugging */ | 966 | /* Someone screwed up their debugging */ |
@@ -985,7 +985,7 @@ void tracing_start(void) | |||
985 | 985 | ||
986 | ftrace_start(); | 986 | ftrace_start(); |
987 | out: | 987 | out: |
988 | spin_unlock_irqrestore(&tracing_start_lock, flags); | 988 | raw_spin_unlock_irqrestore(&tracing_start_lock, flags); |
989 | } | 989 | } |
990 | 990 | ||
991 | /** | 991 | /** |
@@ -1000,7 +1000,7 @@ void tracing_stop(void) | |||
1000 | unsigned long flags; | 1000 | unsigned long flags; |
1001 | 1001 | ||
1002 | ftrace_stop(); | 1002 | ftrace_stop(); |
1003 | spin_lock_irqsave(&tracing_start_lock, flags); | 1003 | raw_spin_lock_irqsave(&tracing_start_lock, flags); |
1004 | if (trace_stop_count++) | 1004 | if (trace_stop_count++) |
1005 | goto out; | 1005 | goto out; |
1006 | 1006 | ||
@@ -1018,7 +1018,7 @@ void tracing_stop(void) | |||
1018 | arch_spin_unlock(&ftrace_max_lock); | 1018 | arch_spin_unlock(&ftrace_max_lock); |
1019 | 1019 | ||
1020 | out: | 1020 | out: |
1021 | spin_unlock_irqrestore(&tracing_start_lock, flags); | 1021 | raw_spin_unlock_irqrestore(&tracing_start_lock, flags); |
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | void trace_stop_cmdline_recording(void); | 1024 | void trace_stop_cmdline_recording(void); |