public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CPUidle: always return with interrupts enabled
@ 2009-09-30 17:35 Kevin Hilman
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2009-09-30 17:35 UTC (permalink / raw)
  To: linux-pm; +Cc: linux-omap, linux-kernel

In the case where cpuidle_idle_call() returns before changing state
due to a need_resched(), it was returning with IRQs disabled.

This patch ensures IRQs are (re)enabled before returning.

Reported-by: Hemanth V <hemanthv@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 drivers/cpuidle/cpuidle.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index ad41f19..12fdd39 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -76,8 +76,11 @@ static void cpuidle_idle_call(void)
 #endif
 	/* ask the governor for the next state */
 	next_state = cpuidle_curr_governor->select(dev);
-	if (need_resched())
+	if (need_resched()) {
+		local_irq_enable();
 		return;
+	}
+
 	target_state = &dev->states[next_state];
 
 	/* enter the state and update stats */
-- 
1.6.4.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-10-16 21:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1254332153-23493-1-git-send-email-khilman@deeprootsystems.com>
2009-09-30 21:21 ` [PATCH] CPUidle: always return with interrupts enabled Rafael J. Wysocki
     [not found] ` <200909302321.33088.rjw@sisk.pl>
2009-10-06 20:34   ` Andrew Morton
2009-10-06 21:02     ` Kevin Hilman
2009-10-16 16:25     ` Martin Michlmayr
     [not found]     ` <20091016162504.GC1391@deprecation.cyrius.com>
2009-10-16 21:11       ` Andrew Morton
2009-09-30 17:35 Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox