aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-10-29 09:34:14 -0400
committerTejun Heo <tj@kernel.org>2009-10-29 09:34:14 -0400
commit6b7487fc6517736a6e32ccc0f8b46109c1b998ec (patch)
tree540f8dade4e4e78c867779ce612cefae40966209 /arch/powerpc/kernel
parent0fe1e009541e925adc1748a605d8b66188e4b2ab (diff)
percpu: make percpu symbols in powerpc unique
This patch updates percpu related symbols in powerpc 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. * arch/powerpc/kernel/perf_callchain.c: s/callchain/cpu_perf_callchain/ * arch/powerpc/kernel/setup-common.c: s/pvr/cpu_pvr/ * arch/powerpc/platforms/pseries/dtl.c: s/dtl/cpu_dtl/ * arch/powerpc/platforms/cell/interrupt.c: s/iic/cpu_iic/ Partly based on Rusty Russell's "alloc_percpu: rename percpu vars which cause name clashes" patch. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Paul Mackerras <paulus@samba.org> Cc: linuxppc-dev@ozlabs.org
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/perf_callchain.c4
-rw-r--r--arch/powerpc/kernel/setup-common.c4
-rw-r--r--arch/powerpc/kernel/smp.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/perf_callchain.c b/arch/powerpc/kernel/perf_callchain.c
index 0a03cf70d24..fe59c44f9b5 100644
--- a/arch/powerpc/kernel/perf_callchain.c
+++ b/arch/powerpc/kernel/perf_callchain.c
@@ -497,11 +497,11 @@ static void perf_callchain_user_32(struct pt_regs *regs,
497 * Since we can't get PMU interrupts inside a PMU interrupt handler, 497 * Since we can't get PMU interrupts inside a PMU interrupt handler,
498 * we don't need separate irq and nmi entries here. 498 * we don't need separate irq and nmi entries here.
499 */ 499 */
500static DEFINE_PER_CPU(struct perf_callchain_entry, callchain); 500static DEFINE_PER_CPU(struct perf_callchain_entry, cpu_perf_callchain);
501 501
502struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) 502struct perf_callchain_entry *perf_callchain(struct pt_regs *regs)
503{ 503{
504 struct perf_callchain_entry *entry = &__get_cpu_var(callchain); 504 struct perf_callchain_entry *entry = &__get_cpu_var(cpu_perf_callchain);
505 505
506 entry->nr = 0; 506 entry->nr = 0;
507 507
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 4271f7a655a..aa5aeb947bc 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -157,7 +157,7 @@ extern u32 cpu_temp_both(unsigned long cpu);
157#endif /* CONFIG_TAU */ 157#endif /* CONFIG_TAU */
158 158
159#ifdef CONFIG_SMP 159#ifdef CONFIG_SMP
160DEFINE_PER_CPU(unsigned int, pvr); 160DEFINE_PER_CPU(unsigned int, cpu_pvr);
161#endif 161#endif
162 162
163static int show_cpuinfo(struct seq_file *m, void *v) 163static int show_cpuinfo(struct seq_file *m, void *v)
@@ -209,7 +209,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
209 } 209 }
210 210
211#ifdef CONFIG_SMP 211#ifdef CONFIG_SMP
212 pvr = per_cpu(pvr, cpu_id); 212 pvr = per_cpu(cpu_pvr, cpu_id);
213#else 213#else
214 pvr = mfspr(SPRN_PVR); 214 pvr = mfspr(SPRN_PVR);
215#endif 215#endif
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 9b86a74d281..2ebb4841097 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -232,7 +232,7 @@ struct thread_info *current_set[NR_CPUS];
232 232
233static void __devinit smp_store_cpu_info(int id) 233static void __devinit smp_store_cpu_info(int id)
234{ 234{
235 per_cpu(pvr, id) = mfspr(SPRN_PVR); 235 per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR);
236} 236}
237 237
238static void __init smp_create_idle(unsigned int cpu) 238static void __init smp_create_idle(unsigned int cpu)