[PATCH timers/core v1] clocksource: Align clocksource watchdog constraints with Kconfig value

From: Connor Williamson

Date: Fri Mar 13 2026 - 10:35:04 EST


A previous patch intended to update both MAX_SKEW_USEC and
CLOCKSOURCE_WATCHDOG_MAX_SKEW_US to 125 microseconds, resulting in a
total tolerable skew per second of 500 microseconds as this value is
doubled prior to being associated with the uncertainty_margin of a
clocksource, and the uncertainty_margin values of two clocksources being
compared are then summed before comparison to the skew.

However, the default value of MAX_SKEW_USEC in the absence of the
Kconfig option was defined as (125 * WATCHDOG_INTERVAL / HZ), which is
(125 * (HZ >> 1)) / HZ, effectively ~ 125/2 microseconds, while
CLOCKSOURCE_WATCHDOG_MAX_SKEW_US was set to 125 microseconds as
intended.

Therefore, align MAX_SKEW_USEC with CLOCKSOURCE_WATCHDOG_MAX_SKEW_US,
setting it to the intended default value of 125 microseconds.

'Fixes: c37e85c135ce ("clocksource: Loosen clocksource watchdog
constraints")'

Signed-off-by: Connor Williamson <connordw@xxxxxxxxxx>
---
kernel/time/clocksource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index e753a0632ac8..bd4aea8db2de 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -137,7 +137,7 @@ static u64 suspend_start;
#ifdef CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US
#define MAX_SKEW_USEC CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US
#else
-#define MAX_SKEW_USEC (125 * WATCHDOG_INTERVAL / HZ)
+#define MAX_SKEW_USEC 125
#endif

/*
--
2.47.3