From 8dbce53cc249a76e9450708d291fce5a7e29c6a1 Mon Sep 17 00:00:00 2001 From: Vaidyanathan Srinivasan Date: Mon, 1 Mar 2010 02:58:09 +0000 Subject: 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 Cc: Gautham R Shenoy Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 9 ++++----- arch/powerpc/platforms/pseries/offline_states.h | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index d1b124e44d7..349e0af9389 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) unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); /* - * NOTE: Calling start_secondary() here for now to - * start new context. - * However, need to do it cleanly by resetting the - * stack pointer. + * Call to start_secondary_resume() will not return. + * Kernel stack will be reset and start_secondary() + * will be called to continue the online operation. */ - start_secondary(); + start_secondary_resume(); } else if (get_preferred_offline_state(cpu) == CPU_STATE_OFFLINE) { diff --git a/arch/powerpc/platforms/pseries/offline_states.h b/arch/powerpc/platforms/pseries/offline_states.h index 202d8692c6a..75a6f480d93 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) extern enum cpu_state_vals get_preferred_offline_state(int cpu); extern int start_secondary(void); +extern void start_secondary_resume(void); #endif -- cgit v1.2.3