path: root/drivers/oprofile/cpu_buffer.h
diff options
authorTejun Heo <>2009-10-29 22:34:13 +0900
committerTejun Heo <>2009-10-29 22:34:13 +0900
commitb3e9f672b6cd0f4c2982c1bcc0b3c3fb39d3b0fe (patch)
tree4aaac8850226d81df5f90240839c1d1310c0ae75 /drivers/oprofile/cpu_buffer.h
parent9705f69ed0a5ef593f45e618bcb3cbfdbf391f64 (diff)
percpu: make percpu symbols in oprofile unique
This patch updates percpu related symbols in oprofile such that percpu symbols are unique and don't clash with local symbols. This serves two purposes of decreasing the possibility of global percpu symbol collision and allowing dropping per_cpu__ prefix from percpu symbols. * drivers/oprofile/cpu_buffer.c: s/cpu_buffer/op_cpu_buffer/ Partly based on Rusty Russell's "alloc_percpu: rename percpu vars which cause name clashes" patch. Signed-off-by: Tejun Heo <> Acked-by: Robert Richter <> Cc: Rusty Russell <>
Diffstat (limited to 'drivers/oprofile/cpu_buffer.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h
index 272995d20293..68ea16ab645f 100644
--- a/drivers/oprofile/cpu_buffer.h
+++ b/drivers/oprofile/cpu_buffer.h
@@ -50,7 +50,7 @@ struct oprofile_cpu_buffer {
struct delayed_work work;
-DECLARE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer);
+DECLARE_PER_CPU(struct oprofile_cpu_buffer, op_cpu_buffer);
* Resets the cpu buffer to a sane state.
@@ -60,7 +60,7 @@ DECLARE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer);
static inline void op_cpu_buffer_reset(int cpu)
- struct oprofile_cpu_buffer *cpu_buf = &per_cpu(cpu_buffer, cpu);
+ struct oprofile_cpu_buffer *cpu_buf = &per_cpu(op_cpu_buffer, cpu);
cpu_buf->last_is_kernel = -1;
cpu_buf->last_task = NULL;