android_kernel_motorola_sm6375/drivers/cpuidle
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kevin Hilman 246eb7f0ed cpuidle: always return with interrupts enabled
In the case where cpuidle_idle_call() returns before changing state due to
a need_resched(), it was returning with IRQs disabled.

The idle path assumes that the platform specific idle code returns with
interrupts enabled (although this too is undocumented AFAICT) and on ARM
we have a WARN_ON(!(irqs_disabled()) when returning from the idle loop, so
the user-visible effects were only a warning since interrupts were
eventually re-enabled later.

On x86, this same problem exists, but there is no WARN_ON() to detect it.
As on ARM, the interrupts are eventually re-enabled, so I'm not sure of
any actual bugs triggered by this.  It's primarily a
correctness/consistency fix.

This patch ensures IRQs are (re)enabled before returning.

Reported-by: Hemanth V <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Venkatesh Pallipadi <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Tested-by: Martin Michlmayr <[email protected]>
Cc: <[email protected]>		[2.6.31.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-10-29 07:39:31 -07:00
..
governors cpuidle: menu governor: reduce latency on exit 2009-09-22 07:17:45 -07:00
cpuidle.c cpuidle: always return with interrupts enabled 2009-10-29 07:39:31 -07:00
cpuidle.h
driver.c
governor.c
Kconfig
Makefile
sysfs.c cpuidle: make sysfs attributes sysdev class attributes 2008-08-12 16:07:28 -07:00