ARM: tegra: Handle timers during LP2 idle ticks
authorTodd Poynor <toddpoynor@google.com>
Mon, 7 Feb 2011 21:42:34 +0000 (13:42 -0800)
committerTodd Poynor <toddpoynor@google.com>
Wed, 9 Feb 2011 02:50:26 +0000 (18:50 -0800)
commit6b825e9aaa011f01e433c57db9f191cb99f30709
treea7b988e0bf830f3c04d640d92ca4a05bfb116b8e
parentda0fbc7f9b0141e7f8665b142509da681f60c9ea
ARM: tegra: Handle timers during LP2 idle ticks

Timer ticks aren't properly serviced while a CPU is in LP2 idle.
Although the Tegra LP2 idle code calls hrtimer_peek_ahead_timers,
because no IRQ regs have been saved, update_process_times is not
called, and thus the timer list is not serviced (and neither is
SMP rebalancing, etc.)  This can cause significant delays
scheduling timer-based activity, especially on CPU 1 (which is
not servicing most other IRQs).

Colin Cross suggested a patch based on upstream review feedback
that uses clock notifiers to switch to the "broadcast" clock event
source ("timer0" Tegra timer 3) during LP2, which has a real
interrupt handler defined that calls the clock event handler in
IRQ context, allowing timers to be checked.

Change-Id: Ifa3f4ec662f07dc9636e433f278358f75b65d10c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
arch/arm/mach-tegra/cpuidle.c