diff options
author | Christoph Lameter <cl@linux.com> | 2014-08-17 13:30:31 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-08-26 13:45:46 -0400 |
commit | 879d92745a1a5a6573dee83cfa2953413fed23fc (patch) | |
tree | 3385792ec352da39955b75af7a7ed9636a6a4df8 | |
parent | 229b6863b2cf9514f08e468fea586bc195ebcf50 (diff) |
drivers/oprofile: Replace __get_cpu_var uses for address calculation
Replace the uses of __get_cpu_var for address calculation with this_cpu_ptr.
Cc: Robert Richter <rric@kernel.org>
Cc: oprofile-list@lists.sf.net
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | drivers/oprofile/cpu_buffer.c | 10 | ||||
-rw-r--r-- | drivers/oprofile/timer_int.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index 8aa73fac6ad4..0581461c3a67 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c | |||
@@ -45,7 +45,7 @@ unsigned long oprofile_get_cpu_buffer_size(void) | |||
45 | 45 | ||
46 | void oprofile_cpu_buffer_inc_smpl_lost(void) | 46 | void oprofile_cpu_buffer_inc_smpl_lost(void) |
47 | { | 47 | { |
48 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer); | 48 | struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer); |
49 | 49 | ||
50 | cpu_buf->sample_lost_overflow++; | 50 | cpu_buf->sample_lost_overflow++; |
51 | } | 51 | } |
@@ -297,7 +297,7 @@ __oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, | |||
297 | unsigned long event, int is_kernel, | 297 | unsigned long event, int is_kernel, |
298 | struct task_struct *task) | 298 | struct task_struct *task) |
299 | { | 299 | { |
300 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer); | 300 | struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer); |
301 | unsigned long backtrace = oprofile_backtrace_depth; | 301 | unsigned long backtrace = oprofile_backtrace_depth; |
302 | 302 | ||
303 | /* | 303 | /* |
@@ -357,7 +357,7 @@ oprofile_write_reserve(struct op_entry *entry, struct pt_regs * const regs, | |||
357 | { | 357 | { |
358 | struct op_sample *sample; | 358 | struct op_sample *sample; |
359 | int is_kernel = !user_mode(regs); | 359 | int is_kernel = !user_mode(regs); |
360 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer); | 360 | struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer); |
361 | 361 | ||
362 | cpu_buf->sample_received++; | 362 | cpu_buf->sample_received++; |
363 | 363 | ||
@@ -412,13 +412,13 @@ int oprofile_write_commit(struct op_entry *entry) | |||
412 | 412 | ||
413 | void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event) | 413 | void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event) |
414 | { | 414 | { |
415 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer); | 415 | struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer); |
416 | log_sample(cpu_buf, pc, 0, is_kernel, event, NULL); | 416 | log_sample(cpu_buf, pc, 0, is_kernel, event, NULL); |
417 | } | 417 | } |
418 | 418 | ||
419 | void oprofile_add_trace(unsigned long pc) | 419 | void oprofile_add_trace(unsigned long pc) |
420 | { | 420 | { |
421 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer); | 421 | struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer); |
422 | 422 | ||
423 | if (!cpu_buf->tracing) | 423 | if (!cpu_buf->tracing) |
424 | return; | 424 | return; |
diff --git a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c index 61be1d9c16c8..bdef916e5dda 100644 --- a/drivers/oprofile/timer_int.c +++ b/drivers/oprofile/timer_int.c | |||
@@ -32,7 +32,7 @@ static enum hrtimer_restart oprofile_hrtimer_notify(struct hrtimer *hrtimer) | |||
32 | 32 | ||
33 | static void __oprofile_hrtimer_start(void *unused) | 33 | static void __oprofile_hrtimer_start(void *unused) |
34 | { | 34 | { |
35 | struct hrtimer *hrtimer = &__get_cpu_var(oprofile_hrtimer); | 35 | struct hrtimer *hrtimer = this_cpu_ptr(&oprofile_hrtimer); |
36 | 36 | ||
37 | if (!ctr_running) | 37 | if (!ctr_running) |
38 | return; | 38 | return; |