Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86 Fix autoconf(9) of cpufeaturebus.



details:   https://anonhg.NetBSD.org/src/rev/889e54330358
branches:  trunk
changeset: 762631:889e54330358
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Thu Feb 24 15:42:17 2011 +0000

description:
Fix autoconf(9) of cpufeaturebus.

diffstat:

 sys/arch/x86/include/cpu.h    |   4 ++--
 sys/arch/x86/include/cpuvar.h |   3 +--
 sys/arch/x86/x86/coretemp.c   |   6 +++---
 sys/arch/x86/x86/cpu.c        |  28 ++++++++--------------------
 sys/arch/x86/x86/est.c        |   6 +++---
 sys/arch/x86/x86/powernow.c   |   6 +++---
 sys/arch/x86/x86/viac7temp.c  |   6 +++---
 7 files changed, 23 insertions(+), 36 deletions(-)

diffs (206 lines):

diff -r 93c74395e3cf -r 889e54330358 sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h        Thu Feb 24 15:27:00 2011 +0000
+++ b/sys/arch/x86/include/cpu.h        Thu Feb 24 15:42:17 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.30 2011/02/23 11:43:22 jruoho Exp $  */
+/*     $NetBSD: cpu.h,v 1.31 2011/02/24 15:42:17 jruoho Exp $  */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -181,7 +181,7 @@
 
        device_t        ci_frequency;   /* Frequency scaling technology */
        device_t        ci_padlock;     /* VIA PadLock private storage */
-       device_t        ci_tempsensor;  /* Intel coretemp(4) or equivalent */
+       device_t        ci_temperature; /* Intel coretemp(4) or equivalent */
 
        struct i386tss  ci_tss;         /* Per-cpu TSS; shared among LWPs */
        char            ci_iomap[IOMAPSIZE]; /* I/O Bitmap */
diff -r 93c74395e3cf -r 889e54330358 sys/arch/x86/include/cpuvar.h
--- a/sys/arch/x86/include/cpuvar.h     Thu Feb 24 15:27:00 2011 +0000
+++ b/sys/arch/x86/include/cpuvar.h     Thu Feb 24 15:42:17 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpuvar.h,v 1.41 2011/02/23 11:43:22 jruoho Exp $ */
+/*     $NetBSD: cpuvar.h,v 1.42 2011/02/24 15:42:17 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -96,7 +96,6 @@
 #include "opt_multiprocessor.h"
 #ifndef XEN
 #include "opt_intel_odcm.h"
-#include "opt_via_c7temp.h"
 #endif
 #endif /* defined(_KERNEL_OPT) */
 
diff -r 93c74395e3cf -r 889e54330358 sys/arch/x86/x86/coretemp.c
--- a/sys/arch/x86/x86/coretemp.c       Thu Feb 24 15:27:00 2011 +0000
+++ b/sys/arch/x86/x86/coretemp.c       Thu Feb 24 15:42:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coretemp.c,v 1.21 2011/02/21 15:10:54 jruoho Exp $ */
+/* $NetBSD: coretemp.c,v 1.22 2011/02/24 15:42:17 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.21 2011/02/21 15:10:54 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.22 2011/02/24 15:42:17 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -128,7 +128,7 @@
        struct cpu_info *ci = cfaa->ci;
        uint32_t regs[4];
 
-       if (strcmp(cfaa->name, "coretemp") != 0)
+       if (strcmp(cfaa->name, "temperature") != 0)
                return 0;
 
        if (cpu_vendor != CPUVENDOR_INTEL || cpuid_level < 0x06)
diff -r 93c74395e3cf -r 889e54330358 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Thu Feb 24 15:27:00 2011 +0000
+++ b/sys/arch/x86/x86/cpu.c    Thu Feb 24 15:42:17 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.85 2011/02/24 13:58:39 jruoho Exp $  */
+/*     $NetBSD: cpu.c,v 1.86 2011/02/24 15:42:17 jruoho Exp $  */
 
 /*-
  * Copyright (c) 2000, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.85 2011/02/24 13:58:39 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.86 2011/02/24 15:42:17 jruoho Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -465,13 +465,7 @@
        if (ifattr_match(ifattr, "cpufeaturebus")) {
 
                if (ci->ci_frequency == NULL) {
-                       cfaa.name = "est";
-                       ci->ci_frequency = config_found_ia(self,
-                           "cpufeaturebus", &cfaa, NULL);
-               }
-
-               if (ci->ci_frequency == NULL) {
-                       cfaa.name = "powernow";
+                       cfaa.name = "frequency";
                        ci->ci_frequency = config_found_ia(self,
                            "cpufeaturebus", &cfaa, NULL);
                }
@@ -482,15 +476,9 @@
                            "cpufeaturebus", &cfaa, NULL);
                }
 
-               if (ci->ci_tempsensor == NULL) {
-                       cfaa.name = "coretemp";
-                       ci->ci_tempsensor = config_found_ia(self,
-                           "cpufeaturebus", &cfaa, NULL);
-               }
-
-               if (ci->ci_tempsensor == NULL) {
-                       cfaa.name = "viac7temp";
-                       ci->ci_tempsensor = config_found_ia(self,
+               if (ci->ci_temperature == NULL) {
+                       cfaa.name = "temperature";
+                       ci->ci_temperature = config_found_ia(self,
                            "cpufeaturebus", &cfaa, NULL);
                }
        }
@@ -510,8 +498,8 @@
        if (ci->ci_padlock == child)
                ci->ci_padlock = NULL;
 
-       if (ci->ci_tempsensor == child)
-               ci->ci_tempsensor = NULL;
+       if (ci->ci_temperature == child)
+               ci->ci_temperature = NULL;
 }
 
 /*
diff -r 93c74395e3cf -r 889e54330358 sys/arch/x86/x86/est.c
--- a/sys/arch/x86/x86/est.c    Thu Feb 24 15:27:00 2011 +0000
+++ b/sys/arch/x86/x86/est.c    Thu Feb 24 15:42:17 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: est.c,v 1.21 2011/02/24 05:14:58 jruoho Exp $  */
+/*     $NetBSD: est.c,v 1.22 2011/02/24 15:42:17 jruoho Exp $  */
 /*
  * Copyright (c) 2003 Michael Eriksson.
  * All rights reserved.
@@ -76,7 +76,7 @@
  *   http://www.codemonkey.org.uk/projects/cpufreq/cpufreq-2.4.22-pre6-1.gz
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.21 2011/02/24 05:14:58 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: est.c,v 1.22 2011/02/24 15:42:17 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -1015,7 +1015,7 @@
        struct cpufeature_attach_args *cfaa = aux;
        struct cpu_info *ci = cfaa->ci;
 
-       if (strcmp(cfaa->name, "est") != 0)
+       if (strcmp(cfaa->name, "frequency") != 0)
                return 0;
 
        if (cpu_vendor != CPUVENDOR_IDT &&
diff -r 93c74395e3cf -r 889e54330358 sys/arch/x86/x86/powernow.c
--- a/sys/arch/x86/x86/powernow.c       Thu Feb 24 15:27:00 2011 +0000
+++ b/sys/arch/x86/x86/powernow.c       Thu Feb 24 15:42:17 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: powernow.c,v 1.1 2011/02/24 10:56:02 jruoho Exp $ */
+/*     $NetBSD: powernow.c,v 1.2 2011/02/24 15:42:17 jruoho Exp $ */
 /*     $OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */
 
 /*-
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: powernow.c,v 1.1 2011/02/24 10:56:02 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powernow.c,v 1.2 2011/02/24 15:42:17 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -147,7 +147,7 @@
        struct cpu_info *ci = cfaa->ci;
        uint32_t family, regs[4];
 
-       if (strcmp(cfaa->name, "powernow") != 0)
+       if (strcmp(cfaa->name, "frequency") != 0)
                return 0;
 
        if (cpu_vendor != CPUVENDOR_AMD)
diff -r 93c74395e3cf -r 889e54330358 sys/arch/x86/x86/viac7temp.c
--- a/sys/arch/x86/x86/viac7temp.c      Thu Feb 24 15:27:00 2011 +0000
+++ b/sys/arch/x86/x86/viac7temp.c      Thu Feb 24 15:42:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: viac7temp.c,v 1.4 2011/02/24 13:58:39 jruoho Exp $ */
+/* $NetBSD: viac7temp.c,v 1.5 2011/02/24 15:42:17 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: viac7temp.c,v 1.4 2011/02/24 13:58:39 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viac7temp.c,v 1.5 2011/02/24 15:42:17 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -65,7 +65,7 @@
        uint32_t family, model;
        uint32_t descs[4];
 
-       if (strcmp(cfaa->name, "viac7temp") != 0)
+       if (strcmp(cfaa->name, "temperature") != 0)
                return 0;
 
        if (cpu_vendor != CPUVENDOR_IDT)



Home | Main Index | Thread Index | Old Index