From 4b8b8e17954884eea1753e06dfe412a9242549e3 Mon Sep 17 00:00:00 2001 From: Li Zhong Date: Wed, 17 Oct 2012 21:30:13 +0000 Subject: [PATCH] --- yaml --- r: 356337 b: refs/heads/master c: fb9125680d0e7c23eae7c6000acc91ea26acab9c h: refs/heads/master i: 356335: 6d020742e8ea16fe50597db8d88bb1c2a993357b v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 ++++++++ trunk/arch/powerpc/platforms/pseries/plpar_wrappers.h | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ba1eee564ecf..aba9ca5dcde0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 323a6bf1d6f4ec7907d9d8aacb4ae9590f755dda +refs/heads/master: fb9125680d0e7c23eae7c6000acc91ea26acab9c diff --git a/trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c b/trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c index a38956269fbf..217ca5c75b20 100644 --- a/trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -127,9 +127,16 @@ static void pseries_mach_cpu_die(void) get_lppaca()->donate_dedicated_cpu = 1; while (get_preferred_offline_state(cpu) == CPU_STATE_INACTIVE) { + while (!prep_irq_for_idle()) { + local_irq_enable(); + local_irq_disable(); + } + extended_cede_processor(cede_latency_hint); } + local_irq_disable(); + if (!get_lppaca()->shared_proc) get_lppaca()->donate_dedicated_cpu = 0; get_lppaca()->idle = 0; @@ -137,6 +144,7 @@ static void pseries_mach_cpu_die(void) if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) { unregister_slb_shadow(hwcpu); + hard_irq_disable(); /* * Call to start_secondary_resume() will not return. * Kernel stack will be reset and start_secondary() diff --git a/trunk/arch/powerpc/platforms/pseries/plpar_wrappers.h b/trunk/arch/powerpc/platforms/pseries/plpar_wrappers.h index e6cc34a67053..b93384929c4c 100644 --- a/trunk/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/trunk/arch/powerpc/platforms/pseries/plpar_wrappers.h @@ -2,6 +2,7 @@ #define _PSERIES_PLPAR_WRAPPERS_H #include +#include #include #include @@ -41,7 +42,14 @@ static inline long extended_cede_processor(unsigned long latency_hint) u8 old_latency_hint = get_cede_latency_hint(); set_cede_latency_hint(latency_hint); + rc = cede_processor(); +#ifdef CONFIG_TRACE_IRQFLAGS + /* Ensure that H_CEDE returns with IRQs on */ + if (WARN_ON(!(mfmsr() & MSR_EE))) + __hard_irq_enable(); +#endif + set_cede_latency_hint(old_latency_hint); return rc;