aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c18
-rw-r--r--arch/powerpc/platforms/pseries/setup.c16
-rw-r--r--include/asm-powerpc/rtas.h2
3 files changed, 16 insertions, 20 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);
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 0dc2548ca9bc..6090d753c44c 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -347,21 +347,6 @@ static int __init pSeries_init_panel(void)
347} 347}
348arch_initcall(pSeries_init_panel); 348arch_initcall(pSeries_init_panel);
349 349
350#ifdef CONFIG_HOTPLUG_CPU
351static void pSeries_mach_cpu_die(void)
352{
353 local_irq_disable();
354 idle_task_exit();
355 xics_teardown_cpu(0);
356 rtas_stop_self();
357 /* Should never get here... */
358 BUG();
359 for(;;);
360}
361#else
362#define pSeries_mach_cpu_die NULL
363#endif
364
365static int pseries_set_dabr(unsigned long dabr) 350static int pseries_set_dabr(unsigned long dabr)
366{ 351{
367 return plpar_hcall_norets(H_SET_DABR, dabr); 352 return plpar_hcall_norets(H_SET_DABR, dabr);
@@ -561,7 +546,6 @@ define_machine(pseries) {
561 .power_off = rtas_power_off, 546 .power_off = rtas_power_off,
562 .halt = rtas_halt, 547 .halt = rtas_halt,
563 .panic = rtas_os_term, 548 .panic = rtas_os_term,
564 .cpu_die = pSeries_mach_cpu_die,
565 .get_boot_time = rtas_get_boot_time, 549 .get_boot_time = rtas_get_boot_time,
566 .get_rtc_time = rtas_get_rtc_time, 550 .get_rtc_time = rtas_get_rtc_time,
567 .set_rtc_time = rtas_set_rtc_time, 551 .set_rtc_time = rtas_set_rtc_time,
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h
index 5a0c136c0416..031ef57fb195 100644
--- a/include/asm-powerpc/rtas.h
+++ b/include/asm-powerpc/rtas.h
@@ -221,8 +221,6 @@ extern int rtas_get_error_log_max(void);
221extern spinlock_t rtas_data_buf_lock; 221extern spinlock_t rtas_data_buf_lock;
222extern char rtas_data_buf[RTAS_DATA_BUF_SIZE]; 222extern char rtas_data_buf[RTAS_DATA_BUF_SIZE];
223 223
224extern void rtas_stop_self(void);
225
226/* RMO buffer reserved for user-space RTAS use */ 224/* RMO buffer reserved for user-space RTAS use */
227extern unsigned long rtas_rmo_buf; 225extern unsigned long rtas_rmo_buf;
228 226