diff options
author | Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> | 2010-02-28 21:58:09 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-03-08 19:57:10 -0500 |
commit | 8dbce53cc249a76e9450708d291fce5a7e29c6a1 (patch) | |
tree | 8480f0fe8a9aff2a63ef5812adc4c18746b5d846 /arch/powerpc/platforms/pseries | |
parent | de0b632ba05bc88949e67d33d1c313fcf922ae2e (diff) |
powerpc: Reset kernel stack on cpu online from cede state
Cpu hotplug (offline) without dlpar operation will place cpu
in cede state and the extended_cede_processor() function will
return when resumed.
Kernel stack pointer needs to be reset before
start_secondary() is called to continue the online operation.
Added new function start_secondary_resume() to do the above
steps.
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 9 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/offline_states.h | 1 |
2 files changed, 5 insertions, 5 deletions
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 | ||
36 | extern enum cpu_state_vals get_preferred_offline_state(int cpu); | 36 | extern enum cpu_state_vals get_preferred_offline_state(int cpu); |
37 | extern int start_secondary(void); | 37 | extern int start_secondary(void); |
38 | extern void start_secondary_resume(void); | ||
38 | #endif | 39 | #endif |