diff options
| -rw-r--r-- | kernel/sched/idle.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index f59198bda1bf..84b93b68482a 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c | |||
| @@ -124,20 +124,8 @@ static void cpuidle_idle_call(void) | |||
| 124 | * Fall back to the default arch idle method on errors. | 124 | * Fall back to the default arch idle method on errors. |
| 125 | */ | 125 | */ |
| 126 | next_state = cpuidle_select(drv, dev); | 126 | next_state = cpuidle_select(drv, dev); |
| 127 | if (next_state < 0) { | 127 | if (next_state < 0) |
| 128 | use_default: | 128 | goto use_default; |
| 129 | /* | ||
| 130 | * We can't use the cpuidle framework, let's use the default | ||
| 131 | * idle routine. | ||
| 132 | */ | ||
| 133 | if (current_clr_polling_and_test()) | ||
| 134 | local_irq_enable(); | ||
| 135 | else | ||
| 136 | arch_cpu_idle(); | ||
| 137 | |||
| 138 | goto exit_idle; | ||
| 139 | } | ||
| 140 | |||
| 141 | 129 | ||
| 142 | /* | 130 | /* |
| 143 | * The idle task must be scheduled, it is pointless to | 131 | * The idle task must be scheduled, it is pointless to |
| @@ -195,6 +183,19 @@ exit_idle: | |||
| 195 | 183 | ||
| 196 | rcu_idle_exit(); | 184 | rcu_idle_exit(); |
| 197 | start_critical_timings(); | 185 | start_critical_timings(); |
| 186 | return; | ||
| 187 | |||
| 188 | use_default: | ||
| 189 | /* | ||
| 190 | * We can't use the cpuidle framework, let's use the default | ||
| 191 | * idle routine. | ||
| 192 | */ | ||
| 193 | if (current_clr_polling_and_test()) | ||
| 194 | local_irq_enable(); | ||
| 195 | else | ||
| 196 | arch_cpu_idle(); | ||
| 197 | |||
| 198 | goto exit_idle; | ||
| 198 | } | 199 | } |
| 199 | 200 | ||
| 200 | /* | 201 | /* |
