Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf22854c authored by Tero Kristo's avatar Tero Kristo Committed by Kevin Hilman
Browse files

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: default avatarTero Kristo <tero.kristo@nokia.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent da869621
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
 * published by the Free Software Foundation.
 */

#include <linux/sched.h>
#include <linux/cpuidle.h>

#include <plat/prcm.h>
@@ -113,7 +114,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
	pwrdm_set_next_pwrst(mpu_pd, mpu_state);
	pwrdm_set_next_pwrst(core_pd, core_state);

	if (omap_irq_pending())
	if (omap_irq_pending() || need_resched())
		goto return_sleep_time;

	if (cx->type == OMAP3_STATE_C1) {
+1 −1
Original line number Diff line number Diff line
@@ -523,7 +523,7 @@ static void omap3_pm_idle(void)
	if (!omap3_can_sleep())
		goto out;

	if (omap_irq_pending())
	if (omap_irq_pending() || need_resched())
		goto out;

	omap_sram_idle();