summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/hotplug-cpu.c
diff options
context:
space:
mode:
authorLi Zhong <zhong@linux.vnet.ibm.com>2012-10-17 23:30:13 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-10 04:43:45 +0100
commitfb9125680d0e7c23eae7c6000acc91ea26acab9c (patch)
tree4f961ee02e1661876e6c2e565c8085558a0e9281 /arch/powerpc/platforms/pseries/hotplug-cpu.c
parentpowerpc: Add a powerpc implementation of SHA-1 (diff)
downloadlinux-fb9125680d0e7c23eae7c6000acc91ea26acab9c.tar.xz
linux-fb9125680d0e7c23eae7c6000acc91ea26acab9c.zip
powerpc: Fix a lazy irq related WARING in arch_local_irq_restore()
The pseries CPU hotplug code uses cede_processor without properly synchronizing the SW and HW interrupt enable state. This fixes it using the same helpers that were written for the idle code. Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> ======================= Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/hotplug-cpu.c')
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index a38956269fbf..217ca5c75b20 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/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()