[POWERPC] Wrap cpu_die() with CONFIG_HOTPLUG_CPU
authorLinas Vepstas <linas@austin.ibm.com>
Thu, 16 Nov 2006 21:41:15 +0000 (15:41 -0600)
committerPaul Mackerras <paulus@samba.org>
Mon, 4 Dec 2006 09:39:29 +0000 (20:39 +1100)
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>
arch/powerpc/kernel/rtas.c
arch/powerpc/platforms/pseries/setup.c
include/asm-powerpc/rtas.h

index 6ef80d4..387ed0d 100644 (file)
@@ -810,9 +810,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
        return 0;
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
 /* This version can't take the spinlock, because it never returns */
-
-struct rtas_args rtas_stop_self_args = {
+static struct rtas_args rtas_stop_self_args = {
        /* The token is initialized for real in setup_system() */
        .token = RTAS_UNKNOWN_SERVICE,
        .nargs = 0,
@@ -834,6 +834,7 @@ void rtas_stop_self(void)
 
        panic("Alas, I survived.\n");
 }
+#endif
 
 /*
  * Call early during boot, before mem init or bootmem, to retrieve the RTAS
index a8f3812..0dc2548 100644 (file)
@@ -347,6 +347,7 @@ static int __init pSeries_init_panel(void)
 }
 arch_initcall(pSeries_init_panel);
 
+#ifdef CONFIG_HOTPLUG_CPU
 static void pSeries_mach_cpu_die(void)
 {
        local_irq_disable();
@@ -357,6 +358,9 @@ static void pSeries_mach_cpu_die(void)
        BUG();
        for(;;);
 }
+#else
+#define pSeries_mach_cpu_die NULL
+#endif
 
 static int pseries_set_dabr(unsigned long dabr)
 {
index d34f9e1..5a0c136 100644 (file)
@@ -54,8 +54,6 @@ struct rtas_args {
        rtas_arg_t *rets;     /* Pointer to return values in args[]. */
 };  
 
-extern struct rtas_args rtas_stop_self_args;
-
 struct rtas_t {
        unsigned long entry;            /* physical address pointer */
        unsigned long base;             /* physical address pointer */