Source-Changes-HG archive

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

[src/netbsd-9]: src Pull up following revision(s) (requested by msaitoh in ti...



details:   https://anonhg.NetBSD.org/src/rev/278e056b7a01
branches:  netbsd-9
changeset: 458400:278e056b7a01
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Sep 26 18:50:18 2019 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #242):

        usr.sbin/cpuctl/arch/i386.c: revision 1.106
        sys/arch/x86/x86/identcpu.c: revision 1.94

Call cpu_dcp_cacheinfo() only when the cpuid Topology Extension flag is set
on AMD processor.

diffstat:

 sys/arch/x86/x86/identcpu.c |  7 ++++---
 usr.sbin/cpuctl/arch/i386.c |  7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 63fba1302a9f -r 278e056b7a01 sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c       Thu Sep 26 18:47:14 2019 +0000
+++ b/sys/arch/x86/x86/identcpu.c       Thu Sep 26 18:50:18 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: identcpu.c,v 1.93 2019/07/26 10:03:40 msaitoh Exp $    */
+/*     $NetBSD: identcpu.c,v 1.93.2.1 2019/09/26 18:50:18 martin Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.93 2019/07/26 10:03:40 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.93.2.1 2019/09/26 18:50:18 martin Exp $");
 
 #include "opt_xen.h"
 
@@ -357,7 +357,8 @@
        if (lfunc < 0x8000001d)
                return;
 
-       cpu_dcp_cacheinfo(ci, 0x8000001d);
+       if (ci->ci_feat_val[3] & CPUID_TOPOEXT)
+               cpu_dcp_cacheinfo(ci, 0x8000001d);
 }
 
 static void
diff -r 63fba1302a9f -r 278e056b7a01 usr.sbin/cpuctl/arch/i386.c
--- a/usr.sbin/cpuctl/arch/i386.c       Thu Sep 26 18:47:14 2019 +0000
+++ b/usr.sbin/cpuctl/arch/i386.c       Thu Sep 26 18:50:18 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i386.c,v 1.104.2.1 2019/09/26 18:47:14 martin Exp $    */
+/*     $NetBSD: i386.c,v 1.104.2.2 2019/09/26 18:50:18 martin Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.104.2.1 2019/09/26 18:47:14 martin Exp $");
+__RCSID("$NetBSD: i386.c,v 1.104.2.2 2019/09/26 18:50:18 martin Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -1433,7 +1433,8 @@
        if (lfunc < 0x8000001d)
                return;
 
-       cpu_dcp_cacheinfo(ci, 0x8000001d);
+       if (ci->ci_feat_val[3] & CPUID_TOPOEXT)
+               cpu_dcp_cacheinfo(ci, 0x8000001d);
 }
 
 static void



Home | Main Index | Thread Index | Old Index