History

tracing: Use __this_cpu_read() in trace_buffered_event_enable()

The code is executed with preemption disabled, so it's safe to use __this_cpu_read(). Link: https://lkml.kernel.org/r/20200813112803.12256-1-tian.xianting@h3c.com

Xianting Tian committed 6 years ago

Commit b427e761 parent 5c8c2061 file · +1 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/trace/trace.c+1−1
@@ -2511,7 +2511,7 @@ void trace_buffered_event_enable(void) · 2510 unmodified lines
25112511
25122512 preempt_disable();
25132513 if (cpu == smp_processor_id() &&
2514− this_cpu_read(trace_buffered_event) !=
2514+ __this_cpu_read(trace_buffered_event) !=
25152515 per_cpu(trace_buffered_event, cpu))
25162516 WARN_ON_ONCE(1);
25172517 preempt_enable();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t