diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-11-16 16:41:15 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 04:39:29 -0500 |
commit | 088df4d256227b3d927bb6ed57e66d138da0565c (patch) | |
tree | aba5648874cff0c517c286c79414026edc5d9534 | |
parent | 5873c9bdb05e9cc68ff4c45a192032a61f705067 (diff) |
[POWERPC] Wrap cpu_die() with CONFIG_HOTPLUG_CPU
Per email discussion, it appears that rtas_stop_self()
and pSeries_mach_cpu_die() should not be compiled if
CONFIG_HOTPLUG_CPU is not defined. This patch adds
#ifdefs around these bits of code.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 4 | ||||
-rw-r--r-- | include/asm-powerpc/rtas.h | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 6ef80d4e38d3..387ed0d9ad61 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -810,9 +810,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
810 | return 0; | 810 | return 0; |
811 | } | 811 | } |
812 | 812 | ||
813 | #ifdef CONFIG_HOTPLUG_CPU | ||
813 | /* This version can't take the spinlock, because it never returns */ | 814 | /* This version can't take the spinlock, because it never returns */ |
814 | 815 | static struct rtas_args rtas_stop_self_args = { | |
815 | struct rtas_args rtas_stop_self_args = { | ||
816 | /* The token is initialized for real in setup_system() */ | 816 | /* The token is initialized for real in setup_system() */ |
817 | .token = RTAS_UNKNOWN_SERVICE, | 817 | .token = RTAS_UNKNOWN_SERVICE, |
818 | .nargs = 0, | 818 | .nargs = 0, |
@@ -834,6 +834,7 @@ void rtas_stop_self(void) | |||
834 | 834 | ||
835 | panic("Alas, I survived.\n"); | 835 | panic("Alas, I survived.\n"); |
836 | } | 836 | } |
837 | #endif | ||
837 | 838 | ||
838 | /* | 839 | /* |
839 | * Call early during boot, before mem init or bootmem, to retrieve the RTAS | 840 | * Call early during boot, before mem init or bootmem, to retrieve the RTAS |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index a8f3812aa38e..0dc2548ca9bc 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -347,6 +347,7 @@ static int __init pSeries_init_panel(void) | |||
347 | } | 347 | } |
348 | arch_initcall(pSeries_init_panel); | 348 | arch_initcall(pSeries_init_panel); |
349 | 349 | ||
350 | #ifdef CONFIG_HOTPLUG_CPU | ||
350 | static void pSeries_mach_cpu_die(void) | 351 | static void pSeries_mach_cpu_die(void) |
351 | { | 352 | { |
352 | local_irq_disable(); | 353 | local_irq_disable(); |
@@ -357,6 +358,9 @@ static void pSeries_mach_cpu_die(void) | |||
357 | BUG(); | 358 | BUG(); |
358 | for(;;); | 359 | for(;;); |
359 | } | 360 | } |
361 | #else | ||
362 | #define pSeries_mach_cpu_die NULL | ||
363 | #endif | ||
360 | 364 | ||
361 | static int pseries_set_dabr(unsigned long dabr) | 365 | static int pseries_set_dabr(unsigned long dabr) |
362 | { | 366 | { |
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index d34f9e1f242c..5a0c136c0416 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
@@ -54,8 +54,6 @@ struct rtas_args { | |||
54 | rtas_arg_t *rets; /* Pointer to return values in args[]. */ | 54 | rtas_arg_t *rets; /* Pointer to return values in args[]. */ |
55 | }; | 55 | }; |
56 | 56 | ||
57 | extern struct rtas_args rtas_stop_self_args; | ||
58 | |||
59 | struct rtas_t { | 57 | struct rtas_t { |
60 | unsigned long entry; /* physical address pointer */ | 58 | unsigned long entry; /* physical address pointer */ |
61 | unsigned long base; /* physical address pointer */ | 59 | unsigned long base; /* physical address pointer */ |