[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200922012451.430245414@goodmis.org>
Date: Mon, 21 Sep 2020 21:24:24 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Xianting Tian <tian.xianting@....com>
Subject: [for-next][PATCH 10/26] tracing: Use __this_cpu_read() in trace_buffered_event_enable()
From: Xianting Tian <tian.xianting@....com>
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@....com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8fac7d6db222..1c4ca25944ba 100644
--- 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();
--
2.28.0
Powered by blists - more mailing lists