Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Use ci_feat_val[7] instead of directly gett...



details:   https://anonhg.NetBSD.org/src/rev/78d16246b8e5
branches:  trunk
changeset: 451321:78d16246b8e5
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu May 16 02:36:30 2019 +0000

description:
Use ci_feat_val[7] instead of directly getting cpuid 7 edx.

diffstat:

 sys/arch/x86/x86/procfs_machdep.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (33 lines):

diff -r 77ff842f3442 -r 78d16246b8e5 sys/arch/x86/x86/procfs_machdep.c
--- a/sys/arch/x86/x86/procfs_machdep.c Thu May 16 01:22:35 2019 +0000
+++ b/sys/arch/x86/x86/procfs_machdep.c Thu May 16 02:36:30 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_machdep.c,v 1.28 2019/02/18 05:41:20 msaitoh Exp $ */
+/*     $NetBSD: procfs_machdep.c,v 1.29 2019/05/16 02:36:30 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.28 2019/02/18 05:41:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.29 2019/05/16 02:36:30 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -345,11 +345,9 @@
                diff = last - *left;
        }
 
-       if ((cpu_vendor == CPUVENDOR_INTEL)
-           && (ci->ci_max_cpuid >= 0x00000007)) {
-               x86_cpuid(0x00000007, descs);
-               procfs_getonefeatreg(descs[3], x86_features[18], p + diff,
-                   left);
+       if (cpu_vendor == CPUVENDOR_INTEL) {
+               procfs_getonefeatreg(ci->ci_feat_val[7], x86_features[18],
+                   p + diff, left);
                diff = last - *left;
        }
 



Home | Main Index | Thread Index | Old Index