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:		22875f8879 x86: Implement deferred TSC calibration
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D33696
This commit is contained in:
Colin Percival 2021-12-30 11:47:50 -08:00
parent 9cb3288287
commit 698727d637

View File

@ -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);