diff mbox series

[3/4] cpuidle/powernv: avoid double irq enable coming out of idle

Message ID 20171116160052.18672-4-npiggin@gmail.com (mailing list archive)
State Accepted
Commit f1343d044629f11e7d63ef1a07edb1db585302e0
Headers show
Series interrupt tracing fixes | expand

Commit Message

Nicholas Piggin Nov. 16, 2017, 4 p.m. UTC
Since e1689795a7 ("cpuidle: Add common time keeping and irq enabling"),
cpuidle drivers are expected to return from ->enter with irqs disabled.

Update the cpuidle-powernv snooze loop to disable irqs before returning.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 drivers/cpuidle/cpuidle-powernv.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Ellerman Jan. 22, 2018, 3:34 a.m. UTC | #1
On Thu, 2017-11-16 at 16:00:51 UTC, Nicholas Piggin wrote:
> Since e1689795a7 ("cpuidle: Add common time keeping and irq enabling"),
> cpuidle drivers are expected to return from ->enter with irqs disabled.
> 
> Update the cpuidle-powernv snooze loop to disable irqs before returning.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/f1343d044629f11e7d63ef1a07edb1

cheers
diff mbox series

Patch

diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index e06605b21841..1a8234e706bc 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -76,6 +76,8 @@  static int snooze_loop(struct cpuidle_device *dev,
 	ppc64_runlatch_on();
 	clear_thread_flag(TIF_POLLING_NRFLAG);
 
+	local_irq_disable();
+
 	return index;
 }