aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/hotplug-cpu.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-12-05 01:52:37 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-07 23:55:55 -0500
commit04da6af960194ecdee4c29cd3f86e766903418ca (patch)
tree310338d736b94f4665880aac81ef455873bb8c63 /arch/powerpc/platforms/pseries/hotplug-cpu.c
parent0332c2d447a7a20a4d744ba3814a349d0c1c6405 (diff)
[POWERPC] Move pSeries_mach_cpu_die() into platforms/pseries/hotplug-cpu.c
Move pSeries_mach_cpu_die() into platforms/pseries/hotplug-cpu.c, this allows rtas_stop_self() to be static so remove the prototype. Wire up pSeries_mach_cpu_die() in the initcall, rather than statically in setup.c, the initcall will still run prior to the cpu hotplug code being callable, so there should be no change in behaviour. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/hotplug-cpu.c')
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 6e21ebdfcef7..9e9b6b159fab 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -1,7 +1,8 @@
1/* 1/*
2 * pseries CPU Hotplug infrastructure. 2 * pseries CPU Hotplug infrastructure.
3 * 3 *
4 * Split out from arch/powerpc/kernel/rtas.c 4 * Split out from arch/powerpc/platforms/pseries/setup.c and
5 * arch/powerpc/kernel/rtas.c
5 * 6 *
6 * Peter Bergner, IBM March 2001. 7 * Peter Bergner, IBM March 2001.
7 * Copyright (C) 2001 IBM. 8 * Copyright (C) 2001 IBM.
@@ -34,7 +35,7 @@ static struct rtas_args rtas_stop_self_args = {
34 .rets = &rtas_stop_self_args.args[0], 35 .rets = &rtas_stop_self_args.args[0],
35}; 36};
36 37
37void rtas_stop_self(void) 38static void rtas_stop_self(void)
38{ 39{
39 struct rtas_args *args = &rtas_stop_self_args; 40 struct rtas_args *args = &rtas_stop_self_args;
40 41
@@ -49,10 +50,23 @@ void rtas_stop_self(void)
49 panic("Alas, I survived.\n"); 50 panic("Alas, I survived.\n");
50} 51}
51 52
53static void pSeries_mach_cpu_die(void)
54{
55 local_irq_disable();
56 idle_task_exit();
57 xics_teardown_cpu(0);
58 rtas_stop_self();
59 /* Should never get here... */
60 BUG();
61 for(;;);
62}
63
52static int __init pseries_cpu_hotplug_init(void) 64static int __init pseries_cpu_hotplug_init(void)
53{ 65{
54 rtas_stop_self_args.token = rtas_token("stop-self"); 66 rtas_stop_self_args.token = rtas_token("stop-self");
55 67
68 ppc_md.cpu_die = pSeries_mach_cpu_die;
69
56 return 0; 70 return 0;
57} 71}
58arch_initcall(pseries_cpu_hotplug_init); 72arch_initcall(pseries_cpu_hotplug_init);