From nobody Sun Jan 16 05:34:21 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 68CB51949CE3; Sun, 16 Jan 2022 05:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jc3cs4xgjz4b5t; Sun, 16 Jan 2022 05:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642311262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ixjKXedPLEjiZkouOkmEgJtR9UQS7SiJcSDJSZXNwS0=; b=CAZu3cquzWX4AF+wkqAJIOSAIINTFH4jQ37exULavzYVI/8JZW99T1/QAn72erTRHBviT7 zy7F5Cr2sVoz/Ya7bPiyYaorPBuP3Wpv8kZGZth4maS7xwX84v8iy2W6heJn4EtybRtzox zJyQYqV1w/dbAC847FY1pV8PxDDKsEIOZ/EwL+edQI+4C1jvJlY0VunSr+8HmpeFQFMZvN eR9Ef0s7PXGFcebTTjvw2tQU+9hI+8MF13Ta5zF2GxH0FY1AZgsEO2tsWbjHhOO9W/gFW0 7iwoY7GlK3rgojj6yUF+CIdDM5t4qgpwFEKt7pAOZJe55r9qdgi2nr+sYp8qmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AF491508C; Sun, 16 Jan 2022 05:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20G5YLqW028172; Sun, 16 Jan 2022 05:34:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20G5YLxM028171; Sun, 16 Jan 2022 05:34:21 GMT (envelope-from git) Date: Sun, 16 Jan 2022 05:34:21 GMT Message-Id: <202201160534.20G5YLxM028171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a04376045ddb - stable/13 - Fix variable name: freq_khz -> freq List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a04376045ddbcb44d46163b8f4418a587162c122 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642311262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ixjKXedPLEjiZkouOkmEgJtR9UQS7SiJcSDJSZXNwS0=; b=jWM4bJv1/m+tLbf+cPUO9Zb6tRBTdfrI/MYJuMQrr3zGvJOgWR7ely6grL8sDprm9qh/ZM Vn722Bj9gSwioDD4T8v0Kuj2/x04PUuvx1RfertpE/r6FxmesGgHt498ATCHhTpvRc/zSF GNphUUw+2nEt7ouofzS/ley8UGm1lfR2bnMmBZIzTeyjZiV0pUQPLEfWSHDQrOHYGOAMrB 3tvt/sYucbO1P7NoTvR2TVRcJfDhn0bpOy64z4g1EFofbmAvnEyUO3IqksU2wiFl6N1Wu0 xE0DPc2elsjxpiQEhoeOucBX6YMkWBPSzoOW70M3aC7761IesoY5ZNLUSj9YOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642311262; a=rsa-sha256; cv=none; b=yNlMwNBtgXBQCHL8HDWwQmENc8VsDY1qkQmVp7jVt+JI/qhWQEcD4ox4H7aHdd/bBKywyA FuJtOCJBYDhZy4RYK6OYRRRvJj+4ArLw2UnvQMDNs/eiHjmM+lV/IP5so/MYd6Cc9gmere cwXJAqDbqNZaR5AWiqOiunmtnhOeTQqInk8PVviYP11iSYV1ckbmHbFX80C5GoLdB8Dk8W K4l/IbeYRULcvFomtwZjV8GmaaEkzWULqOItFtz4DPFi2c2TujJ6+HAFHhIAQd4uITH6Z8 2TmhA5WhNzHo7VuzzAb0eUlWl/EFM4+A9SZ8YkQld7g7pYfRZ9E3ZYXWWXgfcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a04376045ddbcb44d46163b8f4418a587162c122 commit a04376045ddbcb44d46163b8f4418a587162c122 Author: Colin Percival AuthorDate: 2021-12-30 19:47:50 +0000 Commit: Colin Percival 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);