aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/head_64.S11
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c9
-rw-r--r--arch/powerpc/platforms/pseries/offline_states.h1
3 files changed, 16 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index b24b7001ae19..bed9a29ee383 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -617,6 +617,17 @@ _GLOBAL(start_secondary_prolog)
617 std r3,0(r1) /* Zero the stack frame pointer */ 617 std r3,0(r1) /* Zero the stack frame pointer */
618 bl .start_secondary 618 bl .start_secondary
619 b . 619 b .
620/*
621 * Reset stack pointer and call start_secondary
622 * to continue with online operation when woken up
623 * from cede in cpu offline.
624 */
625_GLOBAL(start_secondary_resume)
626 ld r1,PACAKSAVE(r13) /* Reload kernel stack pointer */
627 li r3,0
628 std r3,0(r1) /* Zero the stack frame pointer */
629 bl .start_secondary
630 b .
620#endif 631#endif
621 632
622/* 633/*
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index d1b124e44d77..349e0af9389a 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -146,12 +146,11 @@ static void pseries_mach_cpu_die(void)
146 unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); 146 unregister_slb_shadow(hwcpu, __pa(get_slb_shadow()));
147 147
148 /* 148 /*
149 * NOTE: Calling start_secondary() here for now to 149 * Call to start_secondary_resume() will not return.
150 * start new context. 150 * Kernel stack will be reset and start_secondary()
151 * However, need to do it cleanly by resetting the 151 * will be called to continue the online operation.
152 * stack pointer.
153 */ 152 */
154 start_secondary(); 153 start_secondary_resume();
155 154
156 } else if (get_preferred_offline_state(cpu) == CPU_STATE_OFFLINE) { 155 } else if (get_preferred_offline_state(cpu) == CPU_STATE_OFFLINE) {
157 156
diff --git a/arch/powerpc/platforms/pseries/offline_states.h b/arch/powerpc/platforms/pseries/offline_states.h
index 202d8692c6a2..75a6f480d931 100644
--- a/arch/powerpc/platforms/pseries/offline_states.h
+++ b/arch/powerpc/platforms/pseries/offline_states.h
@@ -35,4 +35,5 @@ static inline void set_default_offline_state(int cpu)
35 35
36extern enum cpu_state_vals get_preferred_offline_state(int cpu); 36extern enum cpu_state_vals get_preferred_offline_state(int cpu);
37extern int start_secondary(void); 37extern int start_secondary(void);
38extern void start_secondary_resume(void);
38#endif 39#endif