From: Shan Wei <shanwei88@gmail.com>
To: rostedt@goodmis.org, fweisbec@gmail.com,
Kernel-Maillist <linux-kernel@vger.kernel.org>,
mingo@redhat.com, cl@linux-foundation.org
Subject: [PATCH 8/9] trace: use this_cpu_ptr per-cpu helper
Date: Wed, 31 Oct 2012 19:23:10 +0800 [thread overview]
Message-ID: <50910A1E.3040009@gmail.com> (raw)
From: Shan Wei <davidshan@tencent.com>
Signed-off-by: Shan Wei <davidshan@tencent.com>
---
kernel/trace/blktrace.c | 2 +-
kernel/trace/trace.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index c0bd030..71259e2 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -147,7 +147,7 @@ void __trace_note_message(struct blk_trace *bt, const char *fmt, ...)
return;
local_irq_save(flags);
- buf = per_cpu_ptr(bt->msg_data, smp_processor_id());
+ buf = this_cpu_ptr(bt->msg_data);
va_start(args, fmt);
n = vscnprintf(buf, BLK_TN_MAX_MSG, fmt, args);
va_end(args);
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 31e4f55..81ae35b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1513,7 +1513,7 @@ static char *get_trace_buf(void)
if (!percpu_buffer)
return NULL;
- buffer = per_cpu_ptr(percpu_buffer, smp_processor_id());
+ buffer = this_cpu_ptr(percpu_buffer);
return buffer->buffer;
}
--
1.7.1
next reply other threads:[~2012-10-31 11:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 11:23 Shan Wei [this message]
2012-10-31 17:50 ` [PATCH 8/9] trace: use this_cpu_ptr per-cpu helper Christoph Lameter
2012-11-02 15:25 ` Shan Wei
2012-11-02 17:53 ` Christoph Lameter
2012-11-03 4:51 ` Shan Wei
2012-11-05 15:18 ` Christoph Lameter
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=50910A1E.3040009@gmail.com \
--to=shanwei88@gmail.com \
--cc=cl@linux-foundation.org \
--cc=fweisbec@gmail.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