summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/kexec.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-07-25 01:46:34 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-08-05 14:47:58 +1000
commit598c8231ab54cfcc8ea6f52882cefee98b129bd1 (patch)
treeff8ae1a2080780c49edc3cd48ef2af86b451c83b /arch/powerpc/platforms/pseries/kexec.c
parent711ef84e80ec6f937ad59c7a00490421a5c92867 (diff)
powerpc/pseries: Simplify vpa deregistration functions
The VPA, SLB shadow and DTL degistration functions do not need an address, so simplify things and remove it. Also cleanup pseries_kexec_cpu_down a bit by storing the cpu IDs in local variables. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/kexec.c')
-rw-r--r--arch/powerpc/platforms/pseries/kexec.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
index 3bae8bd7db3..7d94bdc63d5 100644
--- a/arch/powerpc/platforms/pseries/kexec.c
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -25,34 +25,30 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
{
/* Don't risk a hypervisor call if we're crashing */
if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
- unsigned long addr;
int ret;
+ int cpu = smp_processor_id();
+ int hwcpu = hard_smp_processor_id();
if (get_lppaca()->dtl_enable_mask) {
- ret = unregister_dtl(hard_smp_processor_id());
+ ret = unregister_dtl(hwcpu);
if (ret) {
pr_err("WARNING: DTL deregistration for cpu "
"%d (hw %d) failed with %d\n",
- smp_processor_id(),
- hard_smp_processor_id(), ret);
+ cpu, hwcpu, ret);
}
}
- addr = __pa(get_slb_shadow());
- ret = unregister_slb_shadow(hard_smp_processor_id(), addr);
+ ret = unregister_slb_shadow(hwcpu);
if (ret) {
pr_err("WARNING: SLB shadow buffer deregistration "
"for cpu %d (hw %d) failed with %d\n",
- smp_processor_id(),
- hard_smp_processor_id(), ret);
+ cpu, hwcpu, ret);
}
- addr = __pa(get_lppaca());
- ret = unregister_vpa(hard_smp_processor_id(), addr);
+ ret = unregister_vpa(hwcpu);
if (ret) {
pr_err("WARNING: VPA deregistration for cpu %d "
- "(hw %d) failed with %d\n", smp_processor_id(),
- hard_smp_processor_id(), ret);
+ "(hw %d) failed with %d\n", cpu, hwcpu, ret);
}
}
}