| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: cpu.c,v 1.54 2011/02/24 10:56:03 jruoho Exp $ */ | | 1 | /* $NetBSD: cpu.c,v 1.55 2011/02/24 19:00:58 jruoho Exp $ */ |
2 | /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */ | | 2 | /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */ |
3 | | | 3 | |
4 | /*- | | 4 | /*- |
5 | * Copyright (c) 2000 The NetBSD Foundation, Inc. | | 5 | * Copyright (c) 2000 The NetBSD Foundation, Inc. |
6 | * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, | | 6 | * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, |
7 | * All rights reserved. | | 7 | * All rights reserved. |
8 | * | | 8 | * |
9 | * This code is derived from software contributed to The NetBSD Foundation | | 9 | * This code is derived from software contributed to The NetBSD Foundation |
10 | * by RedBack Networks Inc. | | 10 | * by RedBack Networks Inc. |
11 | * | | 11 | * |
12 | * Author: Bill Sommerfeld | | 12 | * Author: Bill Sommerfeld |
13 | * | | 13 | * |
14 | * Redistribution and use in source and binary forms, with or without | | 14 | * Redistribution and use in source and binary forms, with or without |
| @@ -56,27 +56,27 @@ | | | @@ -56,27 +56,27 @@ |
56 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 56 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
57 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 57 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
58 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE | | 58 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE |
59 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 59 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
60 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 60 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
61 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 61 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
62 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 62 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
63 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 63 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
64 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 64 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
65 | * SUCH DAMAGE. | | 65 | * SUCH DAMAGE. |
66 | */ | | 66 | */ |
67 | | | 67 | |
68 | #include <sys/cdefs.h> | | 68 | #include <sys/cdefs.h> |
69 | __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.54 2011/02/24 10:56:03 jruoho Exp $"); | | 69 | __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.55 2011/02/24 19:00:58 jruoho Exp $"); |
70 | | | 70 | |
71 | #include "opt_ddb.h" | | 71 | #include "opt_ddb.h" |
72 | #include "opt_multiprocessor.h" | | 72 | #include "opt_multiprocessor.h" |
73 | #include "opt_mpbios.h" /* for MPDEBUG */ | | 73 | #include "opt_mpbios.h" /* for MPDEBUG */ |
74 | #include "opt_mtrr.h" | | 74 | #include "opt_mtrr.h" |
75 | #include "opt_xen.h" | | 75 | #include "opt_xen.h" |
76 | | | 76 | |
77 | #include "lapic.h" | | 77 | #include "lapic.h" |
78 | #include "ioapic.h" | | 78 | #include "ioapic.h" |
79 | | | 79 | |
80 | #include <sys/param.h> | | 80 | #include <sys/param.h> |
81 | #include <sys/proc.h> | | 81 | #include <sys/proc.h> |
82 | #include <sys/systm.h> | | 82 | #include <sys/systm.h> |
| @@ -276,33 +276,27 @@ cpu_attach(device_t parent, device_t sel | | | @@ -276,33 +276,27 @@ cpu_attach(device_t parent, device_t sel |
276 | int | | 276 | int |
277 | cpu_rescan(device_t self, const char *ifattr, const int *locators) | | 277 | cpu_rescan(device_t self, const char *ifattr, const int *locators) |
278 | { | | 278 | { |
279 | struct cpu_softc *sc = device_private(self); | | 279 | struct cpu_softc *sc = device_private(self); |
280 | struct cpufeature_attach_args cfaa; | | 280 | struct cpufeature_attach_args cfaa; |
281 | struct cpu_info *ci = sc->sc_info; | | 281 | struct cpu_info *ci = sc->sc_info; |
282 | | | 282 | |
283 | memset(&cfaa, 0, sizeof(cfaa)); | | 283 | memset(&cfaa, 0, sizeof(cfaa)); |
284 | cfaa.ci = ci; | | 284 | cfaa.ci = ci; |
285 | | | 285 | |
286 | if (ifattr_match(ifattr, "cpufeaturebus")) { | | 286 | if (ifattr_match(ifattr, "cpufeaturebus")) { |
287 | | | 287 | |
288 | if (ci->ci_frequency == NULL) { | | 288 | if (ci->ci_frequency == NULL) { |
289 | cfaa.name = "est"; | | 289 | cfaa.name = "frequency"; |
290 | ci->ci_frequency = config_found_ia(self, | | | |
291 | "cpufeaturebus", &cfaa, NULL); | | | |
292 | } | | | |
293 | | | | |
294 | if (ci->ci_frequency == NULL) { | | | |
295 | cfaa.name = "powernow"; | | | |
296 | ci->ci_frequency = config_found_ia(self, | | 290 | ci->ci_frequency = config_found_ia(self, |
297 | "cpufeaturebus", &cfaa, NULL); | | 291 | "cpufeaturebus", &cfaa, NULL); |
298 | } | | 292 | } |
299 | } | | 293 | } |
300 | | | 294 | |
301 | return 0; | | 295 | return 0; |
302 | } | | 296 | } |
303 | | | 297 | |
304 | void | | 298 | void |
305 | cpu_childdetached(device_t self, device_t child) | | 299 | cpu_childdetached(device_t self, device_t child) |
306 | { | | 300 | { |
307 | struct cpu_softc *sc = device_private(self); | | 301 | struct cpu_softc *sc = device_private(self); |
308 | struct cpu_info *ci = sc->sc_info; | | 302 | struct cpu_info *ci = sc->sc_info; |