]> git.baikalelectronics.ru Git - kernel.git/commit
tick/broadcast: Program wakeup timer when entering idle if required
authorWill Deacon <will@kernel.org>
Mon, 24 May 2021 22:18:17 +0000 (23:18 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 31 May 2021 15:04:46 +0000 (17:04 +0200)
commit9ad139b101a546c9222c4ac44d0b7992eb40a6f4
tree3ca52d1974644872549ea613d546ca0c3b0e698e
parent56c056d9b03d92bad2b066ba0dce1a03c1558cc8
tick/broadcast: Program wakeup timer when entering idle if required

When configuring the broadcast timer on entry to and exit from deep idle
states, prefer a per-CPU wakeup timer if one exists.

On entry to idle, stop the tick device and transfer the next event into
the oneshot wakeup device, which will serve as the wakeup from idle. To
avoid the overhead of additional hardware accesses on exit from idle,
leave the timer armed and treat the inevitable interrupt as a (possibly
spurious) tick event.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210524221818.15850-5-will@kernel.org
kernel/time/tick-broadcast.c