diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2024-12-12 21:56:20 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2025-01-15 21:49:13 +0300 |
commit | 776b194116d1a484b6d04abfe4b86272f0700144 (patch) | |
tree | c113d8a6e4c99f4cb8b44ff156cf846fe6273487 | |
parent | 9f38e83a88979ddd630c1f80c2404ecde7854044 (diff) | |
download | linux-776b194116d1a484b6d04abfe4b86272f0700144.tar.xz |
clocksource/wdtest: Print time values for short udelay(1)
When a pair of clocksource reads separated by a udelay(1) claim less than a
full microsecond of elapsed time, print the measured delay as part of the
splat.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/717a2ddf-a80f-490b-aa3a-4e4b74fa56ca@paulmck-laptop
-rw-r--r-- | kernel/time/clocksource-wdtest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/time/clocksource-wdtest.c b/kernel/time/clocksource-wdtest.c index 62e73444ffe4..38dae590b29f 100644 --- a/kernel/time/clocksource-wdtest.c +++ b/kernel/time/clocksource-wdtest.c @@ -137,7 +137,8 @@ static int wdtest_func(void *arg) udelay(1); j2 = clocksource_wdtest_ktime.read(&clocksource_wdtest_ktime); pr_info("--- tsc-like times: %lu - %lu = %lu.\n", j2, j1, j2 - j1); - WARN_ON_ONCE(time_before(j2, j1 + NSEC_PER_USEC)); + WARN_ONCE(time_before(j2, j1 + NSEC_PER_USEC), + "Expected at least 1000ns, got %lu.\n", j2 - j1); /* Verify tsc-like stability with various numbers of errors injected. */ max_retries = clocksource_get_max_watchdog_retry(); |