Re: [PATCH] Clockevents: Always call clockevents_program_event

From: Thomas Gleixner
Date: Tue Oct 24 2017 - 04:37:31 EST


On Tue, 24 Oct 2017, Prasad Sodagudi wrote:

> 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.

No. This is fundmentally wrong. If the clockevent is in oneshot stopped
mode then you cannot call clockevents_program_event(). There is even a
warning in that code which will trigger.

Thanks,

tglx