diff options
author | jkim <jkim@FreeBSD.org> | 2010-12-08 23:40:41 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-12-08 23:40:41 +0000 |
commit | 9eb44e2a50d42aea2650694312bacb8b83a22cc5 (patch) | |
tree | 59127d8bfe53f20d8de36069759429a9429d7719 /sys/pc98 | |
parent | b69863b7fd8c607add70ec120752fc2385a10b99 (diff) | |
download | FreeBSD-src-9eb44e2a50d42aea2650694312bacb8b83a22cc5.zip FreeBSD-src-9eb44e2a50d42aea2650694312bacb8b83a22cc5.tar.gz |
Do not subtract 0.5% from estimated frequency if DELAY(9) is driven by TSC.
Remove a confusing comment about converting to MHz as we never did.
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); } |