Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/cpuctl/arch Call cpu_dcp_cacheinfo() only when the ...
details: https://anonhg.NetBSD.org/src/rev/5b8d101d8136
branches: trunk
changeset: 965269:5b8d101d8136
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Sep 09 05:36:21 2019 +0000
description:
Call cpu_dcp_cacheinfo() only when the cpuid Topology Extension flag is set
on AMD prcessor.
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 f1d26483f37d -r 5b8d101d8136 sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c Mon Sep 09 05:28:32 2019 +0000
+++ b/sys/arch/x86/x86/identcpu.c Mon Sep 09 05:36:21 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.94 2019/09/09 05:36:21 msaitoh 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.94 2019/09/09 05:36:21 msaitoh 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 f1d26483f37d -r 5b8d101d8136 usr.sbin/cpuctl/arch/i386.c
--- a/usr.sbin/cpuctl/arch/i386.c Mon Sep 09 05:28:32 2019 +0000
+++ b/usr.sbin/cpuctl/arch/i386.c Mon Sep 09 05:36:21 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i386.c,v 1.105 2019/08/30 13:12:24 msaitoh Exp $ */
+/* $NetBSD: i386.c,v 1.106 2019/09/09 05:36:21 msaitoh 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.105 2019/08/30 13:12:24 msaitoh Exp $");
+__RCSID("$NetBSD: i386.c,v 1.106 2019/09/09 05:36:21 msaitoh 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