]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[POWERPC] Split out vpa unregister logic from pseries_kexec_cpu_down_xics()
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 24 Aug 2006 06:54:08 +0000 (16:54 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 13 Sep 2006 08:39:52 +0000 (18:39 +1000)
As part of the new irq code pseries_kexec_cpu_down() was split into a
xics and mpic version. The vpa unregister logic is now only done in the
xics routine, and although that's ok in practice (we don't have SPLPAR
machines with mpic), I'd rather have the two concepts stay separate.

So move the vpa unregister into pseries_kexec_cpu_down(), which gets called
by both the xics and mpic routines. This also gives us an obvious place to
put any new kexec-down logic needed in future.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/pseries/setup.c

index 1587efc510577679f4491f0883960fbb608071f1..a6398fbe530dc55ad8a79cb6baad66e586df429e 100644 (file)
@@ -223,12 +223,7 @@ static void pseries_lpar_enable_pmcs(void)
 }
 
 #ifdef CONFIG_KEXEC
-static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
-{
-       mpic_teardown_this_cpu(secondary);
-}
-
-static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
+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) {
@@ -248,6 +243,17 @@ static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
                                        hard_smp_processor_id());
                }
        }
+}
+
+static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
+{
+       pseries_kexec_cpu_down(crash_shutdown, secondary);
+       mpic_teardown_this_cpu(secondary);
+}
+
+static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
+{
+       pseries_kexec_cpu_down(crash_shutdown, secondary);
        xics_teardown_cpu(secondary);
 }
 #endif /* CONFIG_KEXEC */