]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle / sleep: Use broadcast timer for states that stop local timer
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 2 Mar 2015 21:26:55 +0000 (22:26 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Mar 2015 22:13:19 +0000 (23:13 +0100)
commit37b18c7b31fbd4fdd6f2c157599de1d639d6a4cf
treecfd0282b0bb687f84364d70333a89dafff1fb6ca
parent9ed3181eafba3fdcceed7bd4d3cd39d714f11186
cpuidle / sleep: Use broadcast timer for states that stop local timer

Commit 4f942b3a7e3b (PM / sleep: Re-implement suspend-to-idle handling)
overlooked the fact that entering some sufficiently deep idle states
by CPUs may cause their local timers to stop and in those cases it
is necessary to switch over to a broadcast timer prior to entering
the idle state.  If the cpuidle driver in use does not provide
the new ->enter_freeze callback for any of the idle states, that
problem affects suspend-to-idle too, but it is not taken into account
after the changes made by commit 4f942b3a7e3b.

Fix that by changing the definition of cpuidle_enter_freeze() and
re-arranging of the code in cpuidle_idle_call(), so the former does
not call cpuidle_enter() any more and the fallback case is handled
by cpuidle_idle_call() directly.

Fixes: 4f942b3a7e3b (PM / sleep: Re-implement suspend-to-idle handling)
Reported-and-tested-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>
drivers/cpuidle/cpuidle.c
include/linux/cpuidle.h
kernel/sched/idle.c