Skip to content

Commit 088df4d

Browse files
Linas Vepstaspaulusmack
authored andcommitted
[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>
1 parent 5873c9b commit 088df4d

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎arch/powerpc/kernel/rtas.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,9 +810,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
810810
return 0;
811811
}
812812

813+
#ifdef CONFIG_HOTPLUG_CPU
813814
/* 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 = {
816816
/* The token is initialized for real in setup_system() */
817817
.token = RTAS_UNKNOWN_SERVICE,
818818
.nargs = 0,
@@ -834,6 +834,7 @@ void rtas_stop_self(void)
834834

835835
panic("Alas, I survived.\n");
836836
}
837+
#endif
837838

838839
/*
839840
* Call early during boot, before mem init or bootmem, to retrieve the RTAS

‎arch/powerpc/platforms/pseries/setup.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ static int __init pSeries_init_panel(void)
347347
}
348348
arch_initcall(pSeries_init_panel);
349349

350+
#ifdef CONFIG_HOTPLUG_CPU
350351
static void pSeries_mach_cpu_die(void)
351352
{
352353
local_irq_disable();
@@ -357,6 +358,9 @@ static void pSeries_mach_cpu_die(void)
357358
BUG();
358359
for(;;);
359360
}
361+
#else
362+
#define pSeries_mach_cpu_die NULL
363+
#endif
360364

361365
static int pseries_set_dabr(unsigned long dabr)
362366
{

‎include/asm-powerpc/rtas.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ struct rtas_args {
5454
rtas_arg_t *rets; /* Pointer to return values in args[]. */
5555
};
5656

57-
extern struct rtas_args rtas_stop_self_args;
58-
5957
struct rtas_t {
6058
unsigned long entry; /* physical address pointer */
6159
unsigned long base; /* physical address pointer */

0 commit comments

Comments
 (0)