From: Xianting Tian <tian.xianting@h3c.com>
To: <rostedt@goodmis.org>, <mingo@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, Xianting Tian <tian.xianting@h3c.com>
Subject: [PATCH] tracing: use __this_cpu_read() in trace_buffered_event_enable()
Date: Thu, 13 Aug 2020 19:28:03 +0800 [thread overview]
Message-ID: <20200813112803.12256-1-tian.xianting@h3c.com> (raw)
The code is executed with preemption disabled, so it's
safe to use __this_cpu_read().
Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
---
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 bb6226972..7d0d71ce9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2514,7 +2514,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.17.1
next reply other threads:[~2020-08-13 12:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 11:28 Xianting Tian [this message]
2020-09-18 0:31 ` [PATCH] tracing: use __this_cpu_read() in trace_buffered_event_enable() Steven Rostedt
2020-09-18 1:21 ` Tianxianting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200813112803.12256-1-tian.xianting@h3c.com \
--to=tian.xianting@h3c.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).