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

Commit 9ddeac06 authored by Prasad Sodagudi's avatar Prasad Sodagudi Committed by Runmin Wang
Browse files

clockevents: Update clockevents device next_event



Usually clockevent device's next_event is updated in
clockevents_program_event() and next_event indicates
the next timer event on that cpu. Whenever there are
no timers on a CPU, corresponding clockevent device
is going into ONESHOT_STOPPED state but clockevent
device next_event is not updated, because
clockevents_program_event() not called.

As next_event is not updated properly, resulting in spurious
wakeups, so update the clockevent device next_event
with proper value(KTIME_MAX) to avoid spurious wakeups.

Change-Id: I942e884583097c52da52a80bee31d4823173d520
Signed-off-by: default avatarPrasad Sodagudi <psodagud@codeaurora.org>
parent f6ff4f01
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ int tick_program_event(ktime_t expires, int force)
		 * We don't need the clock event device any more, stop it.
		 */
		clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT_STOPPED);
		dev->next_event = KTIME_MAX;
		return 0;
	}