Commit 8feaeca2 authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras

[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: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 577830b0
...@@ -17,4 +17,12 @@ struct pt_regs; ...@@ -17,4 +17,12 @@ struct pt_regs;
extern int pSeries_system_reset_exception(struct pt_regs *regs); extern int pSeries_system_reset_exception(struct pt_regs *regs);
extern int pSeries_machine_check_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 */ #endif /* _PSERIES_PSERIES_H */
...@@ -77,8 +77,6 @@ ...@@ -77,8 +77,6 @@
#endif #endif
/* move those away to a .h */ /* 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); extern void find_udbg_vterm(void);
int fwnmi_active; /* TRUE if an FWNMI handler is present */ int fwnmi_active; /* TRUE if an FWNMI handler is present */
...@@ -272,18 +270,14 @@ static void __init pseries_discover_pic(void) ...@@ -272,18 +270,14 @@ static void __init pseries_discover_pic(void)
#ifdef CONFIG_KEXEC #ifdef CONFIG_KEXEC
ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic; ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
#endif #endif
#ifdef CONFIG_SMP
smp_init_pseries_mpic(); smp_init_pseries_mpic();
#endif
return; return;
} else if (strstr(typep, "ppc-xicp")) { } else if (strstr(typep, "ppc-xicp")) {
ppc_md.init_IRQ = xics_init_IRQ; ppc_md.init_IRQ = xics_init_IRQ;
#ifdef CONFIG_KEXEC #ifdef CONFIG_KEXEC
ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics; ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
#endif #endif
#ifdef CONFIG_SMP
smp_init_pseries_xics(); smp_init_pseries_xics();
#endif
return; return;
} }
} }
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include <asm/vdso_datapage.h> #include <asm/vdso_datapage.h>
#include "plpar_wrappers.h" #include "plpar_wrappers.h"
#include "pseries.h"
#ifdef DEBUG #ifdef DEBUG
#include <asm/udbg.h> #include <asm/udbg.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment