]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
timekeeping: Always check for negative motion
authorThomas Gleixner <tglx@linutronix.de>
Thu, 31 Oct 2024 12:04:08 +0000 (13:04 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 2 Nov 2024 09:14:31 +0000 (10:14 +0100)
commitc163e40af9b2331b2c629fd4ec8b703ed4d4ae39
tree3356239844664919c30a4253fa00a48a3738cbd5
parentd44d26987bb3df6d76556827097fc9ce17565cb8
timekeeping: Always check for negative motion

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@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/all/20241031120328.599430157@linutronix.de
arch/x86/Kconfig
kernel/time/Kconfig
kernel/time/timekeeping_internal.h