lkml.org 
[lkml]   [2017]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Clockevents: Always call clockevents_program_event
Date
Currently tick_program_event function is not calling
clockevents_program_event when 'expires == KTIME_MAX',
it is just updating clockevent state to CLOCK_EVT_STATE_ONESHOT_STOPPED.
clockevents_program_event function updates clockevent
device next_event by checking clockevent device state,
so always call clockevents_program_event() from tick_program_event.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
---
kernel/time/tick-oneshot.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c
index 6b009c2..650b071 100644
--- a/kernel/time/tick-oneshot.c
+++ b/kernel/time/tick-oneshot.c
@@ -28,15 +28,12 @@ int tick_program_event(ktime_t expires, int force)
{
struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev);

- if (unlikely(expires == KTIME_MAX)) {
+ if (expires == KTIME_MAX) {
/*
* We don't need the clock event device any more, stop it.
*/
clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT_STOPPED);
- return 0;
- }
-
- if (unlikely(clockevent_state_oneshot_stopped(dev))) {
+ } else if (clockevent_state_oneshot_stopped(dev)) {
/*
* We need the clock event again, configure it in ONESHOT mode
* before using it.
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
\
 
 \ /
  Last update: 2017-10-24 10:07    [W:0.048 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site