powerpc/pseries: Remove MPIC from pseries kexec
authorRashmica Gupta <rashmicy@gmail.com>
Mon, 30 May 2016 06:18:13 +0000 (16:18 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 14 Jun 2016 03:58:27 +0000 (13:58 +1000)
MPIC was only used by Power3 which is now unsupported, so remove MPIC
code. XICS is now the only supported interrupt controller for
pSeries so do some cleanups too.

Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/kexec.c
arch/powerpc/platforms/pseries/pseries.h
arch/powerpc/platforms/pseries/setup.c

index 13fa95b3aa8bb2bef958c9909cd7fb200cd3fdd6..6681ac97fb1830d30638676698287d0d3d42fdae 100644 (file)
 #include <asm/page.h>
 #include <asm/firmware.h>
 #include <asm/kexec.h>
-#include <asm/mpic.h>
 #include <asm/xics.h>
 #include <asm/smp.h>
 #include <asm/plpar_wrappers.h>
 
 #include "pseries.h"
 
-static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
+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) {
@@ -51,26 +50,6 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
                               "(hw %d) failed with %d\n", cpu, hwcpu, ret);
                }
        }
-}
-
-static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
-{
-       pseries_kexec_cpu_down(crash_shutdown, secondary);
-       mpic_teardown_this_cpu(secondary);
-}
 
-void __init setup_kexec_cpu_down_mpic(void)
-{
-       ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
-}
-
-static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
-{
-       pseries_kexec_cpu_down(crash_shutdown, secondary);
        xics_kexec_teardown_cpu(secondary);
 }
-
-void __init setup_kexec_cpu_down_xics(void)
-{
-       ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
-}
index edeaec74b656ef8bc7e2612948ac4c90d1cfe4ea..ddb9aa51aad6f49bbb67ea1afc85dba074863548 100644 (file)
@@ -36,13 +36,7 @@ extern void smp_init_pseries(void);
 static inline void smp_init_pseries(void) { };
 #endif
 
-#ifdef CONFIG_KEXEC
-extern void setup_kexec_cpu_down_xics(void);
-extern void setup_kexec_cpu_down_mpic(void);
-#else
-static inline void setup_kexec_cpu_down_xics(void) { }
-static inline void setup_kexec_cpu_down_mpic(void) { }
-#endif
+extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
 
 extern void pSeries_final_fixup(void);
 
index 4b94a1e75bcfd237685b613bdc2eaab0c064c5db..34668f9bc57bbf04d65ff0d42cd942d57fe769c1 100644 (file)
@@ -436,7 +436,6 @@ static void __init pSeries_setup_arch(void)
        set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT);
 
        /* Discover PIC type and setup ppc_md accordingly */
-       setup_kexec_cpu_down_xics();
        smp_init_pseries();
 
 
@@ -786,6 +785,7 @@ define_machine(pseries) {
        .machine_check_exception = pSeries_machine_check_exception,
 #ifdef CONFIG_KEXEC
        .machine_kexec          = pSeries_machine_kexec,
+       .kexec_cpu_down         = pseries_kexec_cpu_down,
 #endif
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
        .memory_block_size      = pseries_memory_block_size,