[lkml]   [2017]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] 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.

Signed-off-by: Prasad Sodagudi <>
kernel/time/tick-oneshot.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c
index 6b009c2..c1f518e 100644
--- a/kernel/time/tick-oneshot.c
+++ b/kernel/time/tick-oneshot.c
@@ -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;

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
 \ /
  Last update: 2017-10-26 20:38    [W:0.049 / U:6.080 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site