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 Fix a bug in last commit. Check correct var...



details:   https://anonhg.NetBSD.org/src/rev/7c18d2b9ca48
branches:  trunk
changeset: 791301:7c18d2b9ca48
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Nov 12 16:13:56 2013 +0000

description:
Fix a bug in last commit. Check correct variable.

diffstat:

 sys/arch/x86/x86/cpu.c      |  7 +++++--
 sys/arch/x86/x86/identcpu.c |  6 +++---
 2 files changed, 8 insertions(+), 5 deletions(-)

diffs (62 lines):

diff -r 530404fc8a46 -r 7c18d2b9ca48 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Tue Nov 12 16:11:39 2013 +0000
+++ b/sys/arch/x86/x86/cpu.c    Tue Nov 12 16:13:56 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.103 2013/10/23 20:18:50 drochner Exp $       */
+/*     $NetBSD: cpu.c,v 1.104 2013/11/12 16:13:56 msaitoh Exp $        */
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.103 2013/10/23 20:18:50 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.104 2013/11/12 16:13:56 msaitoh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -245,6 +245,7 @@
                struct x86_cache_info *cai;
                int tcolors;
 
+               printf("CAI = %d\n", i);
                cai = &ci->ci_cinfo[i];
 
                tcolors = atop(cai->cai_totalsize);
@@ -258,6 +259,8 @@
                default:
                        tcolors /= cai->cai_associativity;
                }
+               printf("associativity = %d, totalsize = %d\n",
+                   cai->cai_associativity, cai->cai_totalsize);
                ncolors = max(ncolors, tcolors);
                /*
                 * If the desired number of colors is not a power of
diff -r 530404fc8a46 -r 7c18d2b9ca48 sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c       Tue Nov 12 16:11:39 2013 +0000
+++ b/sys/arch/x86/x86/identcpu.c       Tue Nov 12 16:13:56 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: identcpu.c,v 1.36 2013/11/12 16:11:39 msaitoh Exp $    */
+/*     $NetBSD: identcpu.c,v 1.37 2013/11/12 16:13:56 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.36 2013/11/12 16:11:39 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.37 2013/11/12 16:13:56 msaitoh Exp $");
 
 #include "opt_xen.h"
 
@@ -122,7 +122,7 @@
        if (family == 0xf)
                family += CPUID2EXTFAMILY(ci->ci_signature);
 
-       if ((family == 0xf) || (model == 0x6))
+       if ((family == 0xf) || (family == 0x6))
                model |= CPUID2EXTMODEL(ci->ci_signature) << 4;
 
        /*



Home | Main Index | Thread Index | Old Index