summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-05-22 10:37:06 +0200
committerIngo Molnar <mingo@kernel.org>2014-05-22 10:37:06 +0200
commitec6e7f4082aa0c6c4334149e74673b6ed736fb63 (patch)
tree0facf7775816261ffeeb9bb61468f9075d63cfb6 /kernel
parent65c2ce70046c779974af8b5dfc25a0df489089b5 (diff)
parenta6220fc19afc07fe77cfd16f5b8e568615517091 (diff)
downloadlinux-ec6e7f4082aa0c6c4334149e74673b6ed736fb63.tar.bz2
Merge branch 'pm-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into sched/core
Pull scheduling related CPU idle updates from Rafael J. Wysocki. Conflicts: kernel/sched/idle.c Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/suspend.c2
-rw-r--r--kernel/sched/idle.c13
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