Skip to content

Commit f33a5d4

Browse files
paulmckrcuKAGA-KOKO
authored andcommitted
clocksource: Fix comments on WATCHDOG_THRESHOLD & WATCHDOG_MAX_SKEW
The WATCHDOG_THRESHOLD macro is no longer used to supply a default value for ->uncertainty_margin, but WATCHDOG_MAX_SKEW now is. Therefore, update the comments to reflect this change. Reported-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/all/20240802154618.4149953-3-paulmck@kernel.org
1 parent 1791513 commit f33a5d4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

kernel/time/clocksource.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ static u64 suspend_start;
113113

114114
/*
115115
* Threshold: 0.0312s, when doubled: 0.0625s.
116-
* Also a default for cs->uncertainty_margin when registering clocks.
117116
*/
118117
#define WATCHDOG_THRESHOLD (NSEC_PER_SEC >> 5)
119118

@@ -139,6 +138,13 @@ static u64 suspend_start;
139138
#define MAX_SKEW_USEC (125 * WATCHDOG_INTERVAL / HZ)
140139
#endif
141140

141+
/*
142+
* Default for maximum permissible skew when cs->uncertainty_margin is
143+
* not specified, and the lower bound even when cs->uncertainty_margin
144+
* is specified. This is also the default that is used when registering
145+
* clocks with unspecifed cs->uncertainty_margin, so this macro is used
146+
* even in CONFIG_CLOCKSOURCE_WATCHDOG=n kernels.
147+
*/
142148
#define WATCHDOG_MAX_SKEW (MAX_SKEW_USEC * NSEC_PER_USEC)
143149

144150
#ifdef CONFIG_CLOCKSOURCE_WATCHDOG

0 commit comments

Comments
 (0)