aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-08-24 02:54:08 -0400
committerPaul Mackerras <paulus@samba.org>2006-09-13 04:39:52 -0400
commitf50d4cfc98d70f919afb2924b1b53c36b2f4e62f (patch)
tree352c8c20b13d6951de56c90895161c06e1bb0563 /arch/powerpc
parentaa43f77939c97bf9d3580c6a5e71a5a40290e451 (diff)
[POWERPC] Split out vpa unregister logic from pseries_kexec_cpu_down_xics()
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/pseries/setup.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 1587efc5105..a6398fbe530 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -223,12 +223,7 @@ static void pseries_lpar_enable_pmcs(void)
223} 223}
224 224
225#ifdef CONFIG_KEXEC 225#ifdef CONFIG_KEXEC
226static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary) 226static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
227{
228 mpic_teardown_this_cpu(secondary);
229}
230
231static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
232{ 227{
233 /* Don't risk a hypervisor call if we're crashing */ 228 /* Don't risk a hypervisor call if we're crashing */
234 if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { 229 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)
248 hard_smp_processor_id()); 243 hard_smp_processor_id());
249 } 244 }
250 } 245 }
246}
247
248static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
249{
250 pseries_kexec_cpu_down(crash_shutdown, secondary);
251 mpic_teardown_this_cpu(secondary);
252}
253
254static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
255{
256 pseries_kexec_cpu_down(crash_shutdown, secondary);
251 xics_teardown_cpu(secondary); 257 xics_teardown_cpu(secondary);
252} 258}
253#endif /* CONFIG_KEXEC */ 259#endif /* CONFIG_KEXEC */