Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/i386 Only declare and set the "step" variable ...



details:   https://anonhg.NetBSD.org/src/rev/15883c4de462
branches:  trunk
changeset: 537657:15883c4de462
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri Oct 04 08:44:08 2002 +0000

description:
Only declare and set the "step" variable in identifycpu() ifdef CPUDEBUG.

diffstat:

 sys/arch/i386/i386/machdep.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 9ab6a1de2c0a -r 15883c4de462 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Fri Oct 04 08:31:57 2002 +0000
+++ b/sys/arch/i386/i386/machdep.c      Fri Oct 04 08:44:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.485 2002/10/03 19:39:51 fvdl Exp $       */
+/*     $NetBSD: machdep.c,v 1.486 2002/10/04 08:44:08 simonb Exp $     */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.485 2002/10/03 19:39:51 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.486 2002/10/04 08:44:08 simonb Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -1586,7 +1586,10 @@
 {
        const char *name, *modifier, *vendorname, *brand = "";
        int class = CPUCLASS_386, vendor, i, max;
-       int family, model, step, modif;
+       int family, model, modif;
+#ifdef CPUDEBUG
+       int step;
+#endif
        const struct cpu_cpuid_nameclass *cpup = NULL;
        const struct cpu_cpuid_family *cpufam;
        char *cpuname = ci->ci_dev->dv_xname;
@@ -1613,8 +1616,8 @@
                if (family < CPU_MINFAMILY)
                        panic("identifycpu: strange family value");
                model = CPUID2MODEL(ci->ci_signature);
+#ifdef CPUDEBUG
                step = ci->ci_signature & 0xf;
-#ifdef CPUDEBUG
                printf("%s: family %x model %x step %x\n", cpuname, family,
                        model, step);
 #endif



Home | Main Index | Thread Index | Old Index