Skip to content

Commit e36673e

Browse files
Li Zefanrostedt
authored andcommitted
tracing: Fix lockdep warning in global_clock()
# echo 1 > events/enable # echo global > trace_clock ------------[ cut here ]------------ WARNING: at kernel/lockdep.c:3162 check_flags+0xb2/0x190() ... ---[ end trace 3f86734a89416623 ]--- possible reason: unannotated irqs-on. ... There's no reason to use the raw_local_irq_save() in trace_clock_global. The local_irq_save() version is fine, and does not cause the bug in lockdep. Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> LKML-Reference: <4BA97FA1.7030606@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent b72c409 commit e36673e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/trace/trace_clock.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ u64 notrace trace_clock_global(void)
8484
int this_cpu;
8585
u64 now;
8686

87-
raw_local_irq_save(flags);
87+
local_irq_save(flags);
8888

8989
this_cpu = raw_smp_processor_id();
9090
now = cpu_clock(this_cpu);
@@ -110,7 +110,7 @@ u64 notrace trace_clock_global(void)
110110
arch_spin_unlock(&trace_clock_struct.lock);
111111

112112
out:
113-
raw_local_irq_restore(flags);
113+
local_irq_restore(flags);
114114

115115
return now;
116116
}

0 commit comments

Comments
 (0)