aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-02-26 18:39:21 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-02-28 17:46:24 -0500
commit01e04f466e12e883907937eb04a9010533363f55 (patch)
tree3c10e3c6c051d508bdf655d5e06162b328ffe7cf /kernel
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
idle / sleep: Avoid excessive disabling and enabling interrupts
Disabling interrupts at the end of cpuidle_enter_freeze() is not useful, because its caller, cpuidle_idle_call(), re-enables them right away after invoking it. To avoid that unnecessary back and forth dance with interrupts, make cpuidle_enter_freeze() enable interrupts after calling enter_freeze_proper() and drop the local_irq_disable() at its end, so that all of the code paths in it end up with interrupts enabled. Then, cpuidle_idle_call() will not need to re-enable interrupts after calling cpuidle_enter_freeze() any more, because the latter will return with interrupts enabled, in analogy with cpuidle_enter(). Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/idle.c1
1 files changed, 0 insertions, 1 deletions
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