summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_clock.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2018-04-04 14:50:15 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-04-06 08:56:52 -0400
commitf7a1570da91558fb85b61e53243fe3fa79e2bbae (patch)
tree36602d82229665a0e1375017a78353d21154610f /kernel/trace/trace_clock.c
parent927e56db6253225166d521cee3772624347b5cd5 (diff)
downloadlinux-f7a1570da91558fb85b61e53243fe3fa79e2bbae.tar.bz2
tracing: Hide global trace clock from lockdep
Function tracing can trace in NMIs and such. If the TSC is determined to be unstable, the tracing clock will switch to the global clock on boot up, unless "trace_clock" is specified on the kernel command line. The global clock disables interrupts to access sched_clock_cpu(), and in doing so can be done within lockdep internals (because of function tracing and NMIs). This can trigger false lockdep splats. The trace_clock_global() is special, best not to trace the irq logic within it. Link: http://lkml.kernel.org/r/20180404145015.77bde42d@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_clock.c')
-rw-r--r--kernel/trace/trace_clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
index 5fdc779f411d..d8a188e0418a 100644
--- a/kernel/trace/trace_clock.c
+++ b/kernel/trace/trace_clock.c
@@ -96,7 +96,7 @@ u64 notrace trace_clock_global(void)
int this_cpu;
u64 now;
- local_irq_save(flags);
+ raw_local_irq_save(flags);
this_cpu = raw_smp_processor_id();
now = sched_clock_cpu(this_cpu);
@@ -122,7 +122,7 @@ u64 notrace trace_clock_global(void)
arch_spin_unlock(&trace_clock_struct.lock);
out:
- local_irq_restore(flags);
+ raw_local_irq_restore(flags);
return now;
}