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 report l3 cache information on AMD Fami...



details:   https://anonhg.NetBSD.org/src/rev/2e495fa83839
branches:  trunk
changeset: 778571:2e495fa83839
user:      cegger <cegger%NetBSD.org@localhost>
date:      Thu Apr 05 11:05:53 2012 +0000

description:
report l3 cache information on AMD Family 10h and newer processors

diffstat:

 usr.sbin/cpuctl/arch/i386.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 63dbbb42a76c -r 2e495fa83839 usr.sbin/cpuctl/arch/i386.c
--- a/usr.sbin/cpuctl/arch/i386.c       Thu Apr 05 09:15:56 2012 +0000
+++ b/usr.sbin/cpuctl/arch/i386.c       Thu Apr 05 11:05:53 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i386.c,v 1.29 2012/03/02 16:29:31 sborrill Exp $       */
+/*     $NetBSD: i386.c,v 1.30 2012/04/05 11:05:53 cegger 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.29 2012/03/02 16:29:31 sborrill Exp $");
+__RCSID("$NetBSD: i386.c,v 1.30 2012/04/05 11:05:53 cegger Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -1769,9 +1769,9 @@
                cai->cai_associativity = 0;     /* XXX Unknown/reserved */
 
        /*
-        * Determine L3 cache info on AMD Family 10h processors
+        * Determine L3 cache info on AMD Family 10h and newer processors
         */
-       if (family == 0x10) {
+       if (family >= 0x10) {
                cai = &ci->ci_cinfo[CAI_L3CACHE];
                cai->cai_totalsize = AMD_L3_EDX_C_SIZE(descs[3]);
                cai->cai_associativity = AMD_L3_EDX_C_ASSOC(descs[3]);



Home | Main Index | Thread Index | Old Index