提交 bdffd893 编写于 作者: C Christoph Lameter 提交者: Steven Rostedt

tracing: Replace __get_cpu_var uses with this_cpu_ptr

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.orgAcked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: NChristoph Lameter <cl@linux.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 3415c28c
...@@ -355,7 +355,7 @@ static inline void reset_current_kprobe(void) ...@@ -355,7 +355,7 @@ static inline void reset_current_kprobe(void)
static inline struct kprobe_ctlblk *get_kprobe_ctlblk(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); int register_kprobe(struct kprobe *p);
......
...@@ -822,7 +822,7 @@ function_profile_call(unsigned long ip, unsigned long parent_ip, ...@@ -822,7 +822,7 @@ function_profile_call(unsigned long ip, unsigned long parent_ip,
local_irq_save(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) if (!stat->hash || !ftrace_profile_enabled)
goto out; goto out;
...@@ -853,7 +853,7 @@ static void profile_graph_return(struct ftrace_graph_ret *trace) ...@@ -853,7 +853,7 @@ static void profile_graph_return(struct ftrace_graph_ret *trace)
unsigned long flags; unsigned long flags;
local_irq_save(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) if (!stat->hash || !ftrace_profile_enabled)
goto out; goto out;
......
...@@ -1726,7 +1726,7 @@ static void __ftrace_trace_stack(struct ring_buffer *buffer, ...@@ -1726,7 +1726,7 @@ static void __ftrace_trace_stack(struct ring_buffer *buffer,
*/ */
barrier(); barrier();
if (use_stack == 1) { 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; trace.max_entries = FTRACE_STACK_MAX_ENTRIES;
if (regs) if (regs)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册