[PATCH 07/48] tracing: Replace __get_cpu_var uses with this_cpu_ptr
From: Christoph Lameter
Date: Fri Feb 14 2014 - 15:32:58 EST
Replace uses of &__get_cpu_var for address calculation with this_cpu_ptr.
CC: Steven Rostedt <rostedt@xxxxxxxxxxx>
CC: Frederic Weisbecker <fweisbec@xxxxxxxxx>
CC: Ingo Molnar <mingo@xxxxxxxxxx>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx>
Signed-off-by: Christoph Lameter <cl@xxxxxxxxx>
Index: linux/include/linux/kprobes.h
===================================================================
--- linux.orig/include/linux/kprobes.h 2014-01-30 14:39:56.047604482 -0600
+++ linux/include/linux/kprobes.h 2014-01-30 14:39:56.037604677 -0600
@@ -355,7 +355,7 @@
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);
Index: linux/kernel/trace/ftrace.c
===================================================================
--- linux.orig/kernel/trace/ftrace.c 2014-01-30 14:39:56.047604482 -0600
+++ linux/kernel/trace/ftrace.c 2014-01-30 14:39:56.037604677 -0600
@@ -898,7 +898,7 @@
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;
@@ -929,7 +929,7 @@
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;
Index: linux/kernel/trace/trace.c
===================================================================
--- linux.orig/kernel/trace/trace.c 2014-01-30 14:39:56.047604482 -0600
+++ linux/kernel/trace/trace.c 2014-01-30 14:39:56.037604677 -0600
@@ -1718,7 +1718,7 @@
*/
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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/