Module Name:    src
Committed By:   msaitoh
Date:           Thu May 16 02:36:30 UTC 2019

Modified Files:
        src/sys/arch/x86/x86: procfs_machdep.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/x86/x86/procfs_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.28 src/sys/arch/x86/x86/procfs_machdep.c:1.29
--- src/sys/arch/x86/x86/procfs_machdep.c:1.28	Mon Feb 18 05:41:20 2019
+++ src/sys/arch/x86/x86/procfs_machdep.c	Thu May 16 02:36:30 2019
@@ -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 @@ procfs_getonecpufeatures(struct cpu_info
 		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;
 	}
 

Reply via email to