summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/plpar_wrappers.h
diff options
context:
space:
mode:
authorLi Zhong <zhong@linux.vnet.ibm.com>2012-10-17 21:30:13 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-10 14:43:45 +1100
commitfb9125680d0e7c23eae7c6000acc91ea26acab9c (patch)
tree4f961ee02e1661876e6c2e565c8085558a0e9281 /arch/powerpc/platforms/pseries/plpar_wrappers.h
parent323a6bf1d6f4ec7907d9d8aacb4ae9590f755dda (diff)
downloadtalos-obmc-linux-fb9125680d0e7c23eae7c6000acc91ea26acab9c.tar.gz
talos-obmc-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/plpar_wrappers.h')
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index e6cc34a67053..b93384929c4c 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -2,6 +2,7 @@
#define _PSERIES_PLPAR_WRAPPERS_H
#include <linux/string.h>
+#include <linux/irqflags.h>
#include <asm/hvcall.h>
#include <asm/paca.h>
@@ -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;
OpenPOWER on IntegriCloud