projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c8c206
)
tracing: Use __this_cpu_read() in trace_buffered_event_enable()
author
Xianting Tian
<tian.xianting@h3c.com>
Thu, 13 Aug 2020 11:28:03 +0000
(19:28 +0800)
committer
Steven Rostedt (VMware)
<rostedt@goodmis.org>
Tue, 22 Sep 2020 01:06:02 +0000
(21:06 -0400)
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
Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace.c
patch
|
blob
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index
8fac7d6
..
1c4ca25
100644
(file)
--- a/
kernel/trace/trace.c
+++ b/
kernel/trace/trace.c
@@
-2511,7
+2511,7
@@
void trace_buffered_event_enable(void)
preempt_disable();
if (cpu == smp_processor_id() &&
- this_cpu_read(trace_buffered_event) !=
+
__
this_cpu_read(trace_buffered_event) !=
per_cpu(trace_buffered_event, cpu))
WARN_ON_ONCE(1);
preempt_enable();