diff options
-rw-r--r-- | sys/x86/x86/tsc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index 6debe3ecca6d..6f0ef697cb2f 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -708,7 +708,14 @@ tsc_calibrate(void) if (tsc_disabled) return; + /* + * Avoid using a low-quality timecounter to re-calibrate. In + * particular, old 32-bit platforms might only have the 8254 timer to + * calibrate against. + */ tc = atomic_load_ptr(&timecounter); + if (tc->tc_quality <= 0) + goto calibrated; flags = intr_disable(); cpu = curcpu; |