linux/drivers/cpuidle
Preeti U Murthy ba8f20c2eb cpuidle: Handle clockevents_notify(BROADCAST_ENTER) failure
Some archs set the CPUIDLE_FLAG_TIMER_STOP flag for idle states in which the
local timers stop. The cpuidle_idle_call() currently handles such idle states
by calling into the broadcast framework so as to wakeup CPUs at their next
wakeup event. With the hrtimer mode of broadcast, the BROADCAST_ENTER call
into the broadcast frameowork can fail for archs that do not have an external
clock device to handle wakeups and the CPU in question has thus to be made
the stand by CPU. This patch handles such cases by failing the call into
cpuidle so that the arch can take some default action. The arch will certainly
not enter a similar idle state because a failed cpuidle call will also implicitly
indicate that the broadcast framework has not registered this CPU to be woken up.
Hence we are safe if we fail the cpuidle call.

In the process move the functions that trace idle statistics just before and
after the entry and exit into idle states respectively. In other
scenarios where the call to cpuidle fails, we end up not tracing idle
entry and exit since a decision on an idle state could not be taken. Similarly
when the call to broadcast framework fails, we skip tracing idle statistics
because we are in no further position to take a decision on an alternative
idle state to enter into.

Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: deepthi@linux.vnet.ibm.com
Cc: paulmck@linux.vnet.ibm.com
Cc: fweisbec@gmail.com
Cc: paulus@samba.org
Cc: srivatsa.bhat@linux.vnet.ibm.com
Cc: svaidy@linux.vnet.ibm.com
Cc: peterz@infradead.org
Cc: benh@kernel.crashing.org
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20140207080652.17187.66344.stgit@preeti.in.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-02-07 15:34:29 +01:00
..
governors cpuidle: Change struct menu_device field types 2013-08-23 00:24:16 +02:00
coupled.c cpuidle: Fix comments in cpuidle core 2013-10-30 01:21:21 +01:00
cpuidle-at91.c ARM: at91: cpuidle: Move driver to drivers/cpuidle 2013-10-16 23:49:35 +02:00
cpuidle-big_little.c cpuidle: big.LITTLE: vexpress-TC2 CPU idle driver 2013-08-28 11:28:51 -07:00
cpuidle-calxeda.c ARM/cpuidle: remove __init tag from Calxeda cpuidle probe function 2013-12-30 11:55:20 +01:00
cpuidle-kirkwood.c cpuidle-kirkwood.c: simplify use of devm_ioremap_resource() 2013-08-14 22:20:06 +02:00
cpuidle-powernv.c powerpc/powernv/cpuidle: Back-end cpuidle driver for powernv platform. 2014-01-29 17:02:24 +11:00
cpuidle-pseries.c powerpc/pseries/cpuidle: smt-snooze-delay cleanup. 2014-01-29 17:02:24 +11:00
cpuidle-ux500.c ARM: ux500: cpuidle: fix section mismatch 2013-10-07 16:47:07 +02:00
cpuidle-zynq.c ARM: zynq: cpuidle: convert to platform driver 2013-10-07 16:46:59 +02:00
cpuidle.c cpuidle: Handle clockevents_notify(BROADCAST_ENTER) failure 2014-02-07 15:34:29 +01:00
cpuidle.h cpuidle: support multiple drivers 2012-11-15 00:34:23 +01:00
driver.c cpuidle: don't call poll_idle_init() for every cpu 2013-10-30 01:21:23 +01:00
governor.c cpuidle: remove cpuidle_unregister_governor() 2013-10-30 01:21:24 +01:00
Kconfig powerpc/pseries/cpuidle: Move processor_idle.c to drivers/cpuidle. 2014-01-29 17:02:22 +11:00
Kconfig.arm ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
Kconfig.powerpc powerpc/powernv/cpuidle: Back-end cpuidle driver for powernv platform. 2014-01-29 17:02:24 +11:00
Makefile powerpc/powernv/cpuidle: Back-end cpuidle driver for powernv platform. 2014-01-29 17:02:24 +11:00
sysfs.c cpuidle: use drv instead of cpuidle_driver in show_current_driver() 2013-10-30 01:21:23 +01:00