]> err.no Git - linux-2.6/commitdiff
[POWERPC] Cleanup pseries smp initialisation code
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 8 Feb 2007 07:33:55 +0000 (18:33 +1100)
committerPaul Mackerras <paulus@samba.org>
Wed, 14 Feb 2007 00:50:03 +0000 (11:50 +1100)
Move some extern declarations from setup.c into the new pseries.h.
While we're at it, provide dummy implementations for !SMP, to avoid
cluttering the C file with more #ifdefs.

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

index 37618cb896cbeffd321857c525c0fe3d269ba4ef..36c791572682f75e137bbb1d0d4b43c881fb37e0 100644 (file)
@@ -17,4 +17,12 @@ struct pt_regs;
 extern int pSeries_system_reset_exception(struct pt_regs *regs);
 extern int pSeries_machine_check_exception(struct pt_regs *regs);
 
+#ifdef CONFIG_SMP
+extern void smp_init_pseries_mpic(void);
+extern void smp_init_pseries_xics(void);
+#else
+static inline smp_init_pseries_mpic(void) { };
+static inline smp_init_pseries_xics(void) { };
+#endif
+
 #endif /* _PSERIES_PSERIES_H */
index a28264ce1044a2828d799fe169bb1b5698222066..769815680be1db87f24cc8112d2efd581be98e42 100644 (file)
@@ -77,8 +77,6 @@
 #endif
 
 /* move those away to a .h */
-extern void smp_init_pseries_mpic(void);
-extern void smp_init_pseries_xics(void);
 extern void find_udbg_vterm(void);
 
 int fwnmi_active;  /* TRUE if an FWNMI handler is present */
@@ -272,18 +270,14 @@ static void __init pseries_discover_pic(void)
 #ifdef CONFIG_KEXEC
                        ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
 #endif
-#ifdef CONFIG_SMP
                        smp_init_pseries_mpic();
-#endif
                        return;
                } else if (strstr(typep, "ppc-xicp")) {
                        ppc_md.init_IRQ       = xics_init_IRQ;
 #ifdef CONFIG_KEXEC
                        ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
 #endif
-#ifdef CONFIG_SMP
                        smp_init_pseries_xics();
-#endif
                        return;
                }
        }
index 4408518eaebe4afe76d6a1b3f354a4a6cc0a0421..116305b22a2bf209721e12bfca19666e6a293432 100644 (file)
@@ -48,6 +48,7 @@
 #include <asm/vdso_datapage.h>
 
 #include "plpar_wrappers.h"
+#include "pseries.h"
 
 #ifdef DEBUG
 #include <asm/udbg.h>