diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-29 15:19:21 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-29 15:19:21 +0200 |
commit | df8d9eeadd0f7a216f2476351d5aee43c6550bf0 (patch) | |
tree | 5290522027dd4acd6912c69446ad181c2aff4324 /kernel/context_tracking.c | |
parent | Linux 4.1-rc1 (diff) | |
download | linux-df8d9eeadd0f7a216f2476351d5aee43c6550bf0.tar.xz linux-df8d9eeadd0f7a216f2476351d5aee43c6550bf0.zip |
cpuidle: Run tick_broadcast_exit() with disabled interrupts
Commit 335f49196fd6 (sched/idle: Use explicit broadcast oneshot
control function) replaced clockevents_notify() invocations in
cpuidle_idle_call() with direct calls to tick_broadcast_enter()
and tick_broadcast_exit(), but it overlooked the fact that
interrupts were already enabled before calling the latter which
led to functional breakage on systems using idle states with the
CPUIDLE_FLAG_TIMER_STOP flag set.
Fix that by moving the invocations of tick_broadcast_enter()
and tick_broadcast_exit() down into cpuidle_enter_state() where
interrupts are still disabled when tick_broadcast_exit() is
called. Also ensure that interrupts will be disabled before
running tick_broadcast_exit() even if they have been enabled by
the idle state's ->enter callback. Trigger a WARN_ON_ONCE() in
that case, as we generally don't want that to happen for states
with CPUIDLE_FLAG_TIMER_STOP set.
Fixes: 335f49196fd6 (sched/idle: Use explicit broadcast oneshot control function)
Reported-and-tested-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reported-and-tested-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/context_tracking.c')
0 files changed, 0 insertions, 0 deletions