Skip to content

Commit f7a1570

Browse files
committed
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/[email protected] Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 927e56d commit f7a1570

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/trace/trace_clock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ u64 notrace trace_clock_global(void)
9696
int this_cpu;
9797
u64 now;
9898

99-
local_irq_save(flags);
99+
raw_local_irq_save(flags);
100100

101101
this_cpu = raw_smp_processor_id();
102102
now = sched_clock_cpu(this_cpu);
@@ -122,7 +122,7 @@ u64 notrace trace_clock_global(void)
122122
arch_spin_unlock(&trace_clock_struct.lock);
123123

124124
out:
125-
local_irq_restore(flags);
125+
raw_local_irq_restore(flags);
126126

127127
return now;
128128
}

0 commit comments

Comments
 (0)