aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2022-07-04 20:42:07 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2022-07-04 20:42:07 +0000
commit03473e8ec8fa8d0f1ea30f85d8796ea9bf94bf29 (patch)
tree84b4a369c46cea32e494e76e6d00d21c24559849
parent42317e642645b36e711b5dd560d06a303a492e0f (diff)
downloadsrc-03473e8ec8fa8d0f1ea30f85d8796ea9bf94bf29.tar.gz
src-03473e8ec8fa8d0f1ea30f85d8796ea9bf94bf29.zip
linux(4): Use saved cpu feature bits
MFC after: 3 days
-rw-r--r--sys/x86/linux/linux_vdso_selector_x86.c11
1 files changed, 0 insertions, 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);
}