aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/cpuidle34xx.c
diff options
context:
space:
mode:
authorTero Kristo <tero.kristo@nokia.com>2009-03-20 09:21:02 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-11 17:42:50 -0500
commitcf22854cee10e16e28b1dde136c37e82b7d503ee (patch)
treedfde2fd974b8d15d1a1a5a2c13d57d5fe9dd8e76 /arch/arm/mach-omap2/cpuidle34xx.c
parentda869621c3cd93d5a8361f243b50e5d48d12bd14 (diff)
OMAP3: PM: Added resched check into idle calls
Fixes a bug where scheduling is delayed until next wakeup due to race condition (e.g. interrupt requests scheduling just before omap_sram_idle is entered.) Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/cpuidle34xx.c')
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 1d10c4aa935..a26d6a08ae3 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -22,6 +22,7 @@
22 * published by the Free Software Foundation. 22 * published by the Free Software Foundation.
23 */ 23 */
24 24
25#include <linux/sched.h>
25#include <linux/cpuidle.h> 26#include <linux/cpuidle.h>
26 27
27#include <plat/prcm.h> 28#include <plat/prcm.h>
@@ -113,7 +114,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
113 pwrdm_set_next_pwrst(mpu_pd, mpu_state); 114 pwrdm_set_next_pwrst(mpu_pd, mpu_state);
114 pwrdm_set_next_pwrst(core_pd, core_state); 115 pwrdm_set_next_pwrst(core_pd, core_state);
115 116
116 if (omap_irq_pending()) 117 if (omap_irq_pending() || need_resched())
117 goto return_sleep_time; 118 goto return_sleep_time;
118 119
119 if (cx->type == OMAP3_STATE_C1) { 120 if (cx->type == OMAP3_STATE_C1) {