hrtimer: Initialize cpu_base.next_timer to NULL conditionally
hrtimer_cpu_base.next_timer stores the pointer to the next expiring timer
in a CPU base. This pointer is used to check whether a hrtimer which is
removed is the hrtimer which is the first to expire in the CPU base.
To get the estimated sleep length cpuidle_select call from governor depends
on hrtimer_next_event_without() which does __hrtimer_get_next_event()
excluding tick_sched_timer.
cpu_base.next_timer is made NULL unconditionally but actual timer
assignment is skipped in case of exclude call. So this pointer stays
NULL and we skip programming the hrtimer event even though the hrtimer
being removed is the first one to expire. This may result in an unwanted
old event getting triggered.
Fix this by initializing cpu_base.next_timer to NULL only for non exclude
calls.
Change-Id: I3c64f34e487e224a6a3b75a840869fc1371dd5b7
Signed-off-by:
Srinivas Ramana <sramana@codeaurora.org>
Loading
Please register or sign in to comment