summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/idle.c13
1 files changed, 4 insertions, 9 deletions
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