aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-02-08 02:33:55 -0500
committerPaul Mackerras <paulus@samba.org>2007-02-13 19:50:03 -0500
commit8feaeca23ab8f520e7af2a862fd6ea8e7bfd8854 (patch)
tree249798bed7822c8b2640122ae15c485a1f29593e /arch
parent577830b034bc11c93d4b9e21e8782900d5485e7f (diff)
[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 <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/pseries.h8
-rw-r--r--arch/powerpc/platforms/pseries/setup.c6
-rw-r--r--arch/powerpc/platforms/pseries/smp.c1
3 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 37618cb896cb..36c791572682 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -17,4 +17,12 @@ struct pt_regs;
17extern int pSeries_system_reset_exception(struct pt_regs *regs); 17extern int pSeries_system_reset_exception(struct pt_regs *regs);
18extern int pSeries_machine_check_exception(struct pt_regs *regs); 18extern int pSeries_machine_check_exception(struct pt_regs *regs);
19 19
20#ifdef CONFIG_SMP
21extern void smp_init_pseries_mpic(void);
22extern void smp_init_pseries_xics(void);
23#else
24static inline smp_init_pseries_mpic(void) { };
25static inline smp_init_pseries_xics(void) { };
26#endif
27
20#endif /* _PSERIES_PSERIES_H */ 28#endif /* _PSERIES_PSERIES_H */
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index a28264ce1044..769815680be1 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -77,8 +77,6 @@
77#endif 77#endif
78 78
79/* move those away to a .h */ 79/* move those away to a .h */
80extern void smp_init_pseries_mpic(void);
81extern void smp_init_pseries_xics(void);
82extern void find_udbg_vterm(void); 80extern void find_udbg_vterm(void);
83 81
84int fwnmi_active; /* TRUE if an FWNMI handler is present */ 82int fwnmi_active; /* TRUE if an FWNMI handler is present */
@@ -272,18 +270,14 @@ static void __init pseries_discover_pic(void)
272#ifdef CONFIG_KEXEC 270#ifdef CONFIG_KEXEC
273 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic; 271 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
274#endif 272#endif
275#ifdef CONFIG_SMP
276 smp_init_pseries_mpic(); 273 smp_init_pseries_mpic();
277#endif
278 return; 274 return;
279 } else if (strstr(typep, "ppc-xicp")) { 275 } else if (strstr(typep, "ppc-xicp")) {
280 ppc_md.init_IRQ = xics_init_IRQ; 276 ppc_md.init_IRQ = xics_init_IRQ;
281#ifdef CONFIG_KEXEC 277#ifdef CONFIG_KEXEC
282 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics; 278 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
283#endif 279#endif
284#ifdef CONFIG_SMP
285 smp_init_pseries_xics(); 280 smp_init_pseries_xics();
286#endif
287 return; 281 return;
288 } 282 }
289 } 283 }
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 4408518eaebe..116305b22a2b 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -48,6 +48,7 @@
48#include <asm/vdso_datapage.h> 48#include <asm/vdso_datapage.h>
49 49
50#include "plpar_wrappers.h" 50#include "plpar_wrappers.h"
51#include "pseries.h"
51 52
52#ifdef DEBUG 53#ifdef DEBUG
53#include <asm/udbg.h> 54#include <asm/udbg.h>