Skip to content
Commit 84dccadd authored by Peter Hilber's avatar Peter Hilber Committed by Thomas Gleixner
Browse files

timekeeping: Fix cross-timestamp interpolation on counter wrap



cycle_between() decides whether get_device_system_crosststamp() will
interpolate for older counter readings.

cycle_between() yields wrong results for a counter wrap-around where after
< before < test, and for the case after < test < before.

Fix the comparison logic.

Fixes: 2c756feb ("time: Add history to cross timestamp interface supporting slower devices")
Signed-off-by: default avatarPeter Hilber <peter.hilber@opensynergy.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarJohn Stultz <jstultz@google.com>
Link: https://lore.kernel.org/r/20231218073849.35294-2-peter.hilber@opensynergy.com
parent c92a7eb6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment