Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jan 2022 05:34:21 GMT
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a04376045ddb - stable/13 - Fix variable name: freq_khz -> freq
Message-ID:  <202201160534.20G5YLxM028171@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=a04376045ddbcb44d46163b8f4418a587162c122

commit a04376045ddbcb44d46163b8f4418a587162c122
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2021-12-30 19:47:50 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2022-01-16 05:33:48 +0000

    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
    Differential Revision:  https://reviews.freebsd.org/D33696
    
    (cherry picked from commit 698727d637341f2306138ca0ea181444de3df479)
---
 sys/x86/x86/tsc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c
index 7c4375979b3d..2365a3bcebe6 100644
--- a/sys/x86/x86/tsc.c
+++ b/sys/x86/x86/tsc.c
@@ -702,7 +702,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;
@@ -745,9 +745,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201160534.20G5YLxM028171>