From 577830b034bc11c93d4b9e21e8782900d5485e7f Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Thu, 8 Feb 2007 18:33:51 +1100 Subject: [POWERPC] Consolidate pseries platform header files into pseries.h Following the example of platforms/pasemi, consolidate a couple of tiny header files in platforms/pseries into pseries.h. This gives us a convenient place to put things that need to be available to the platform code, but not public. And hopefully will help people resist the temptation of sticking externs in C files. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/pseries/pseries.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 arch/powerpc/platforms/pseries/pseries.h (limited to 'arch/powerpc/platforms/pseries/pseries.h') diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h new file mode 100644 index 00000000000..37618cb896c --- /dev/null +++ b/arch/powerpc/platforms/pseries/pseries.h @@ -0,0 +1,20 @@ +/* + * Copyright 2006 IBM Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _PSERIES_PSERIES_H +#define _PSERIES_PSERIES_H + +extern void __init fw_feature_init(void); + +struct pt_regs; + +extern int pSeries_system_reset_exception(struct pt_regs *regs); +extern int pSeries_machine_check_exception(struct pt_regs *regs); + +#endif /* _PSERIES_PSERIES_H */ -- cgit v1.2.3 From 8feaeca23ab8f520e7af2a862fd6ea8e7bfd8854 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Thu, 8 Feb 2007 18:33:55 +1100 Subject: [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 Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/pseries/pseries.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/powerpc/platforms/pseries/pseries.h') diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h index 37618cb896c..36c79157268 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 */ -- cgit v1.2.3 From dce623e0827e8d0ad60ce7f385c3394bf1b0bae0 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Thu, 8 Feb 2007 18:33:55 +1100 Subject: [POWERPC] Cleanup pseries kexec code Move all the pseries kexec code into one file, platforms/pseries/kexec.c Provide helpers for setting up ppc_md.kexec_cpu_down, so that we don't have to have #ifdef CONFIG_KEXEC in setup.c Move the initialisation of the ppc_md kexec callbacks into an init routine. This is well and truly early enough to cause no change in behaviour, we can't kexec until userspace has given us a kernel to kexec into. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/pseries/pseries.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/powerpc/platforms/pseries/pseries.h') diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h index 36c79157268..b43f1397a5b 100644 --- a/arch/powerpc/platforms/pseries/pseries.h +++ b/arch/powerpc/platforms/pseries/pseries.h @@ -25,4 +25,12 @@ static inline smp_init_pseries_mpic(void) { }; static inline smp_init_pseries_xics(void) { }; #endif +#ifdef CONFIG_KEXEC +extern void setup_kexec_cpu_down_xics(void); +extern void setup_kexec_cpu_down_mpic(void); +#else +static inline setup_kexec_cpu_down_xics(void) { }; +static inline setup_kexec_cpu_down_mpic(void) { }; +#endif + #endif /* _PSERIES_PSERIES_H */ -- cgit v1.2.3