public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Christoph Lameter <cl@linux.com>
Subject: [for-next][PATCH 03/13] tracing: Replace __get_cpu_var uses with this_cpu_ptr
Date: Mon, 12 May 2014 11:11:33 -0400	[thread overview]
Message-ID: <20140512151203.113684478@goodmis.org> (raw)
In-Reply-To: 20140512151130.345864843@goodmis.org

[-- Attachment #1: 0003-tracing-Replace-__get_cpu_var-uses-with-this_cpu_ptr.patch --]
[-- Type: text/plain, Size: 2079 bytes --]

From: Christoph Lameter <cl@linux.com>

Replace uses of &__get_cpu_var for address calculation with this_cpu_ptr.

Link: http://lkml.kernel.org/p/alpine.DEB.2.10.1404291415560.18364@gentwo.org

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/linux/kprobes.h | 2 +-
 kernel/trace/ftrace.c   | 4 ++--
 kernel/trace/trace.c    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 925eaf2..7bd2ad0 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -355,7 +355,7 @@ static inline void reset_current_kprobe(void)
 
 static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void)
 {
-	return (&__get_cpu_var(kprobe_ctlblk));
+	return this_cpu_ptr(&kprobe_ctlblk);
 }
 
 int register_kprobe(struct kprobe *p);
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 9eb1aa0..38e5cf7 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -822,7 +822,7 @@ function_profile_call(unsigned long ip, unsigned long parent_ip,
 
 	local_irq_save(flags);
 
-	stat = &__get_cpu_var(ftrace_profile_stats);
+	stat = this_cpu_ptr(&ftrace_profile_stats);
 	if (!stat->hash || !ftrace_profile_enabled)
 		goto out;
 
@@ -853,7 +853,7 @@ static void profile_graph_return(struct ftrace_graph_ret *trace)
 	unsigned long flags;
 
 	local_irq_save(flags);
-	stat = &__get_cpu_var(ftrace_profile_stats);
+	stat = this_cpu_ptr(&ftrace_profile_stats);
 	if (!stat->hash || !ftrace_profile_enabled)
 		goto out;
 
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4c392c8..0543169 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1726,7 +1726,7 @@ static void __ftrace_trace_stack(struct ring_buffer *buffer,
 	 */
 	barrier();
 	if (use_stack == 1) {
-		trace.entries		= &__get_cpu_var(ftrace_stack).calls[0];
+		trace.entries		= this_cpu_ptr(ftrace_stack.calls);
 		trace.max_entries	= FTRACE_STACK_MAX_ENTRIES;
 
 		if (regs)
-- 
1.8.5.3



  parent reply	other threads:[~2014-05-12 15:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 15:11 [for-next][PATCH 00/13] tracing: More updates for 3.16 Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 01/13] ftrace: Have function graph tracer use global_ops for filtering Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 02/13] tracing: Remove myself as a tracing maintainer Steven Rostedt
2014-05-12 15:11 ` Steven Rostedt [this message]
2014-05-12 15:11 ` [for-next][PATCH 04/13] tracing: Add trace_<tracepoint>_enabled() function Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 05/13] tracing: Add __bitmask() macro to trace events to cpumasks and other bitmasks Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 06/13] ftrace: Remove boolean of hash_enable and hash_disable Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 07/13] ftrace: Write in missing comment from a very old commit Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 08/13] ftrace: Always inline ftrace_hash_empty() helper function Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 09/13] ftrace/x86: Get the current mcount addr for add_breakpoint() Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 10/13] ftrace: Make get_ftrace_addr() and get_ftrace_addr_old() global Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 11/13] ftrace: Use the ftrace_addr helper functions to find the ftrace_addr Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 12/13] ftrace: Remove FTRACE_UPDATE_MODIFY_CALL_REGS flag Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 13/13] ftrace/x86: Move the mcount/fentry code out of entry_64.S Steven Rostedt

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=20140512151203.113684478@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.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