diff --git a/drivers/power/pm/pm_idle.c b/drivers/power/pm/pm_idle.c index 42f37cdf9b0..80d65a4ca85 100644 --- a/drivers/power/pm/pm_idle.c +++ b/drivers/power/pm/pm_idle.c @@ -146,10 +146,11 @@ void pm_idle(pm_idle_handler_t handler) /* If sched lock before irq save, and irq handler do post, scheduler will * be delayed after WFI until next sched unlock. which is not acceptable. + * per cpu sched_lock/unlock is not available here, all post/wait api will + * not allow in pm_callbacks. */ flags = up_irq_save(); - sched_lock(); oldstate = pm_querystate(domain); newstate = pm_checkstate(domain); @@ -200,10 +201,11 @@ void pm_idle(pm_idle_handler_t handler) /* If there is pending irq, enable irq make handlers finish all * execution will be better decrease scheduler context switch times. + * per cpu sched_lock/unlock is not available here, all post/wait api will + * not allow in pm_callbacks. */ up_irq_restore(flags); - sched_unlock(); } #else