Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Linas Vepstas and committed by
Paul Mackerras
088df4d2 5873c9bd

+7 -4
+3 -2
arch/powerpc/kernel/rtas.c
··· 810 810 return 0; 811 811 } 812 812 813 + #ifdef CONFIG_HOTPLUG_CPU 813 814 /* This version can't take the spinlock, because it never returns */ 814 - 815 - struct rtas_args rtas_stop_self_args = { 815 + static struct rtas_args rtas_stop_self_args = { 816 816 /* The token is initialized for real in setup_system() */ 817 817 .token = RTAS_UNKNOWN_SERVICE, 818 818 .nargs = 0, ··· 834 834 835 835 panic("Alas, I survived.\n"); 836 836 } 837 + #endif 837 838 838 839 /* 839 840 * Call early during boot, before mem init or bootmem, to retrieve the RTAS
+4
arch/powerpc/platforms/pseries/setup.c
··· 347 347 } 348 348 arch_initcall(pSeries_init_panel); 349 349 350 + #ifdef CONFIG_HOTPLUG_CPU 350 351 static void pSeries_mach_cpu_die(void) 351 352 { 352 353 local_irq_disable(); ··· 358 357 BUG(); 359 358 for(;;); 360 359 } 360 + #else 361 + #define pSeries_mach_cpu_die NULL 362 + #endif 361 363 362 364 static int pseries_set_dabr(unsigned long dabr) 363 365 {
-2
include/asm-powerpc/rtas.h
··· 54 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 57 struct rtas_t { 60 58 unsigned long entry; /* physical address pointer */ 61 59 unsigned long base; /* physical address pointer */