diff options
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/pc98/machdep.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 03933a6..5a27646 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -1092,12 +1092,16 @@ cpu_est_clockrate(int cpu_id, uint64_t *rate) thread_unlock(curthread); #endif + tsc2 -= tsc1; + if (tsc_freq != 0 && !tsc_is_broken) { + *rate = tsc2 * 1000; + return (0); + } + /* - * Calculate the difference in readings, convert to Mhz, and - * subtract 0.5% of the total. Empirical testing has shown that + * Subtract 0.5% of the total. Empirical testing has shown that * overhead in DELAY() works out to approximately this value. */ - tsc2 -= tsc1; *rate = tsc2 * 1000 - tsc2 * 5; return (0); } |