git: 4b6f4db3410d - main - libc/x86/__vdso_gettc.c::tsc_selector_idx(): cpu_id is calculated but not used
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Nov 2021 15:43:12 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=4b6f4db3410d3d00c5e0e597243bb7d945356213
commit 4b6f4db3410d3d00c5e0e597243bb7d945356213
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-11-28 03:14:20 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-11-29 15:39:51 +0000
libc/x86/__vdso_gettc.c::tsc_selector_idx(): cpu_id is calculated but not used
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
---
lib/libc/x86/sys/__vdso_gettc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/libc/x86/sys/__vdso_gettc.c b/lib/libc/x86/sys/__vdso_gettc.c
index 5cc847e31c0e..b3f3de9f4203 100644
--- a/lib/libc/x86/sys/__vdso_gettc.c
+++ b/lib/libc/x86/sys/__vdso_gettc.c
@@ -147,7 +147,7 @@ static const struct tsc_selector_tag tsc_selector[] = {
static int
tsc_selector_idx(u_int cpu_feature)
{
- u_int amd_feature, cpu_exthigh, cpu_id, p[4], v[3];
+ u_int amd_feature, cpu_exthigh, p[4], v[3];
static const char amd_id[] = "AuthenticAMD";
static const char hygon_id[] = "HygonGenuine";
bool amd_cpu;
@@ -162,9 +162,6 @@ tsc_selector_idx(u_int cpu_feature)
amd_cpu = memcmp(v, amd_id, sizeof(amd_id) - 1) == 0 ||
memcmp(v, hygon_id, sizeof(hygon_id) - 1) == 0;
- do_cpuid(1, p);
- cpu_id = p[0];
-
if (cpu_feature != 0) {
do_cpuid(0x80000000, p);
cpu_exthigh = p[0];