Re: [patch 2/2] timekeeping: Always check for negative motion

From: John Stultz
Date: Sat Nov 02 2024 - 00:15:53 EST


On Thu, Oct 31, 2024 at 5:04 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> clocksource_delta() has two variants. One with a check for negative motion,
> which is only selected by x86. This is a historic leftover as this function
> was previously used in the time getter hot paths.
>
> Since 135225a363ae timekeeping_cycles_to_ns() has unconditional protection
> against this as a by-product of the protection against 64bit math overflow.
>
> clocksource_delta() is only used in the clocksource watchdog and in
> timekeeping_advance(). The extra conditional there is not hurting anyone.
>
> Remove the config option and unconditionally prevent negative motion of the
> readout.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

Acked-by: John Stultz <jstultz@xxxxxxxxxx>