Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2022 21:30:16 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 00c933e9254c - stable/13 - linux(4): Use saved cpu feature bits
Message-ID:  <202207112130.26BLUGKA030753@gitrepo.freebsd.org>

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

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

commit 00c933e9254c0890f6f7cf695f82dcf6ba2a6c51
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-07-04 20:42:07 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-07-11 21:28:11 +0000

    linux(4): Use saved cpu feature bits
    
    MFC after:              3 days
    
    (cherry picked from commit 03473e8ec8fa8d0f1ea30f85d8796ea9bf94bf29)
---
 sys/x86/linux/linux_vdso_selector_x86.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/sys/x86/linux/linux_vdso_selector_x86.c b/sys/x86/linux/linux_vdso_selector_x86.c
index d93b26ed44df..bd8ae333801b 100644
--- a/sys/x86/linux/linux_vdso_selector_x86.c
+++ b/sys/x86/linux/linux_vdso_selector_x86.c
@@ -61,21 +61,10 @@ linux_vdso_tsc_selector_idx()
 int
 linux_vdso_cpu_selector_idx()
 {
-	u_int amd_feature, cpu_exthigh, p[4];
 
 	if ((cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0)
 		return (LINUX_VDSO_CPU_RDPID);
 
-	amd_feature = 0;
-	if (cpu_feature != 0) {
-		do_cpuid(0x80000000, p);
-		cpu_exthigh = p[0];
-		if (cpu_exthigh >= 0x80000001) {
-			do_cpuid(0x80000001, p);
-			amd_feature = p[3];
-		}
-	}
-
 	return ((amd_feature & AMDID_RDTSCP) == 0 ?
 	    LINUX_VDSO_CPU_DEFAULT : LINUX_VDSO_CPU_RDTSCP);
 }



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