diff options
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 6 | ||||
-rw-r--r-- | kernel/sched/idle.c | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 4d534582514e..b573f584b15a 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -117,6 +117,8 @@ static void enter_freeze_proper(struct cpuidle_driver *drv, | |||
117 | * If there are states with the ->enter_freeze callback, find the deepest of | 117 | * If there are states with the ->enter_freeze callback, find the deepest of |
118 | * them and enter it with frozen tick. Otherwise, find the deepest state | 118 | * them and enter it with frozen tick. Otherwise, find the deepest state |
119 | * available and enter it normally. | 119 | * available and enter it normally. |
120 | * | ||
121 | * Returns with enabled interrupts. | ||
120 | */ | 122 | */ |
121 | void cpuidle_enter_freeze(void) | 123 | void cpuidle_enter_freeze(void) |
122 | { | 124 | { |
@@ -132,6 +134,7 @@ void cpuidle_enter_freeze(void) | |||
132 | index = cpuidle_find_deepest_state(drv, dev, true); | 134 | index = cpuidle_find_deepest_state(drv, dev, true); |
133 | if (index >= 0) { | 135 | if (index >= 0) { |
134 | enter_freeze_proper(drv, dev, index); | 136 | enter_freeze_proper(drv, dev, index); |
137 | local_irq_enable(); | ||
135 | return; | 138 | return; |
136 | } | 139 | } |
137 | 140 | ||
@@ -144,9 +147,6 @@ void cpuidle_enter_freeze(void) | |||
144 | cpuidle_enter(drv, dev, index); | 147 | cpuidle_enter(drv, dev, index); |
145 | else | 148 | else |
146 | arch_cpu_idle(); | 149 | arch_cpu_idle(); |
147 | |||
148 | /* Interrupts are enabled again here. */ | ||
149 | local_irq_disable(); | ||
150 | } | 150 | } |
151 | 151 | ||
152 | /** | 152 | /** |
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 94b2d7b88a27..f59198bda1bf 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c | |||
@@ -116,7 +116,6 @@ static void cpuidle_idle_call(void) | |||
116 | */ | 116 | */ |
117 | if (idle_should_freeze()) { | 117 | if (idle_should_freeze()) { |
118 | cpuidle_enter_freeze(); | 118 | cpuidle_enter_freeze(); |
119 | local_irq_enable(); | ||
120 | goto exit_idle; | 119 | goto exit_idle; |
121 | } | 120 | } |
122 | 121 | ||