diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/suspend.c | 2 | ||||
-rw-r--r-- | kernel/sched/idle.c | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 8233cd4047d7..155721f7f909 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -54,9 +54,11 @@ static void freeze_begin(void) static void freeze_enter(void) { + cpuidle_use_deepest_state(true); cpuidle_resume(); wait_event(suspend_freeze_wait_head, suspend_freeze_wake); cpuidle_pause(); + cpuidle_use_deepest_state(false); } void freeze_wake(void) diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 34083c9ac976..25b9423abce9 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -98,10 +98,11 @@ static void cpuidle_idle_call(void) rcu_idle_enter(); /* - * Check if the cpuidle framework is ready, otherwise fallback - * to the default arch specific idle method + * Ask the cpuidle framework to choose a convenient idle state. + * Fall back to the default arch idle method on errors. */ - if (cpuidle_enabled(drv, dev)) { + next_state = cpuidle_select(drv, dev); + if (next_state < 0) { use_default: /* * We can't use the cpuidle framework, let's use the default @@ -115,12 +116,6 @@ use_default: goto exit_idle; } - /* - * Ask the governor to choose an idle state it thinks - * it is convenient to go to. There is *always* a - * convenient idle state - */ - next_state = cpuidle_select(drv, dev); /* * The idle task must be scheduled, it is pointless to |