aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/lpar.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-11-03 03:34:38 -0500
committerMichael Ellerman <michael@ellerman.id.au>2005-11-03 03:34:38 -0500
commit40765d2b8b86446b4ac8ec880cf4fdf56ce4ae7e (patch)
tree36f18519c5094495840a1a1c424f24db837eed22 /arch/powerpc/platforms/pseries/lpar.c
parentc87ef1171db207d9d19f87ad12db92974d95c466 (diff)
powerpc: Cleanup vpa code
register_vpa() doesn't actually do a VPA register call it just uses the flags you pass it, so rename it to vpa_call() to be clearer. We can then define register_vpa() and unregister_vpa() which are both simple wrappers around vpa_call(). (we'll need unregister_vpa() for kexec soon) We can then cleanup vpa_init(), and because vpa_init() is only called from platforms/pseries we remove the definition in asm-ppc64/smp.h. Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/pseries/lpar.c')
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 8a7bda3db67..e384a5a9179 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -261,22 +261,18 @@ out:
261void vpa_init(int cpu) 261void vpa_init(int cpu)
262{ 262{
263 int hwcpu = get_hard_smp_processor_id(cpu); 263 int hwcpu = get_hard_smp_processor_id(cpu);
264 unsigned long vpa = (unsigned long)&(paca[cpu].lppaca); 264 unsigned long vpa = __pa(&paca[cpu].lppaca);
265 long ret; 265 long ret;
266 unsigned long flags;
267
268 /* Register the Virtual Processor Area (VPA) */
269 flags = 1UL << (63 - 18);
270 266
271 if (cpu_has_feature(CPU_FTR_ALTIVEC)) 267 if (cpu_has_feature(CPU_FTR_ALTIVEC))
272 paca[cpu].lppaca.vmxregs_in_use = 1; 268 paca[cpu].lppaca.vmxregs_in_use = 1;
273 269
274 ret = register_vpa(flags, hwcpu, __pa(vpa)); 270 ret = register_vpa(hwcpu, vpa);
275 271
276 if (ret) 272 if (ret)
277 printk(KERN_ERR "WARNING: vpa_init: VPA registration for " 273 printk(KERN_ERR "WARNING: vpa_init: VPA registration for "
278 "cpu %d (hw %d) of area %lx returns %ld\n", 274 "cpu %d (hw %d) of area %lx returns %ld\n",
279 cpu, hwcpu, __pa(vpa), ret); 275 cpu, hwcpu, vpa, ret);
280} 276}
281 277
282long pSeries_lpar_hpte_insert(unsigned long hpte_group, 278long pSeries_lpar_hpte_insert(unsigned long hpte_group,