Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8feaeca23ab8f520e7af2a862fd6ea8e7bfd8854
Commit:     8feaeca23ab8f520e7af2a862fd6ea8e7bfd8854
Parent:     577830b034bc11c93d4b9e21e8782900d5485e7f
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 8 18:33:55 2007 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Feb 14 11:50:03 2007 +1100

    [POWERPC] Cleanup pseries smp initialisation code
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/pseries/pseries.h |    8 ++++++++
 arch/powerpc/platforms/pseries/setup.c   |    6 ------
 arch/powerpc/platforms/pseries/smp.c     |    1 +
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/pseries.h 
b/arch/powerpc/platforms/pseries/pseries.h
index 37618cb..36c7915 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -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 */
diff --git a/arch/powerpc/platforms/pseries/setup.c 
b/arch/powerpc/platforms/pseries/setup.c
index a28264c..7698156 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -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;
                }
        }
diff --git a/arch/powerpc/platforms/pseries/smp.c 
b/arch/powerpc/platforms/pseries/smp.c
index 4408518..116305b 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -48,6 +48,7 @@
 #include <asm/vdso_datapage.h>
 
 #include "plpar_wrappers.h"
+#include "pseries.h"
 
 #ifdef DEBUG
 #include <asm/udbg.h>
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to