diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2021-12-30 19:47:50 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2022-01-02 21:07:53 +0000 |
commit | 698727d637341f2306138ca0ea181444de3df479 (patch) | |
tree | 1521a618324986a651d06b54a53b1a87549a892d /sys/x86 | |
parent | 9cb3288287ba1b3c1d0ec891c552fc4b9472027e (diff) | |
download | src-698727d637341f2306138ca0ea181444de3df479.tar.gz src-698727d637341f2306138ca0ea181444de3df479.zip |
Fix variable name: freq_khz -> freq
An earlier version of this code computed the TSC frequency in kHz.
When the code was changed to compute the frequency more accurately,
the variable name was not updated.
Reviewed by: markj
Fixes: 22875f88799e x86: Implement deferred TSC calibration
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33696
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/x86/tsc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index 534fdb5dd279..29da37ca6874 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -704,7 +704,7 @@ void tsc_calibrate(void) { struct timecounter *tc; - uint64_t freq_khz, tsc_start, tsc_end; + uint64_t freq, tsc_start, tsc_end; u_int t_start, t_end; register_t flags; int cpu; @@ -740,9 +740,9 @@ tsc_calibrate(void) t_end += (uint64_t)tc->tc_counter_mask + 1; } - freq_khz = tc->tc_frequency * (tsc_end - tsc_start) / (t_end - t_start); + freq = tc->tc_frequency * (tsc_end - tsc_start) / (t_end - t_start); - tsc_update_freq(freq_khz); + tsc_update_freq(freq); calibrated: tc_init(&tsc_timecounter); set_cputicker(rdtsc, tsc_freq, !tsc_is_invariant); |