Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2afae9e5 authored by Srinivas Ramana's avatar Srinivas Ramana
Browse files

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: default avatarSrinivas Ramana <sramana@codeaurora.org>
parent c96a62ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment