[lkml]   [2019]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3.16 34/72] powerpc/pseries: correctly track irq state in default idle
3.16.79-rc1 review patch.  If anyone has any objections, please let me know.


From: Nathan Lynch <>

commit 92c94dfb69e350471473fd3075c74bc68150879e upstream.

prep_irq_for_idle() is intended to be called before entering
H_CEDE (and it is used by the pseries cpuidle driver). However the
default pseries idle routine does not call it, leading to mismanaged
lazy irq state when the cpuidle driver isn't in use. Manifestations of
this include:

* Dropped IPIs in the time immediately after a cpu comes
online (before it has installed the cpuidle handler), making the
online operation block indefinitely waiting for the new cpu to

* Hitting this WARN_ON in arch_local_irq_restore():
* We should already be hard disabled here. We had bugs
* where that wasn't the case so let's dbl check it and
* warn if we are wrong. Only do that when IRQ tracing
* is enabled as mfmsr() can be costly.
if (WARN_ON_ONCE(mfmsr() & MSR_EE))

Call prep_irq_for_idle() from pseries_lpar_idle() and honor its

Fixes: 363edbe2614a ("powerpc: Default arch idle could cede processor on pseries")
Signed-off-by: Nathan Lynch <>
Signed-off-by: Michael Ellerman <>
Signed-off-by: Ben Hutchings <>
arch/powerpc/platforms/pseries/setup.c | 3 +++
1 file changed, 3 insertions(+)

--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -360,6 +360,9 @@ static void pseries_lpar_idle(void)
* low power mode by cedeing processor to hypervisor

+ if (!prep_irq_for_idle())
+ return;
/* Indicate to hypervisor that we are idle. */
get_lppaca()->idle = 1;

 \ /
  Last update: 2019-12-08 14:58    [W:0.188 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site