| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: acpi.c,v 1.212 2010/08/07 09:41:19 jruoho Exp $ */ | | 1 | /* $NetBSD: acpi.c,v 1.213 2010/08/07 17:12:55 jruoho Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Charles M. Hannum of By Noon Software, Inc. | | 8 | * by Charles M. Hannum of By Noon Software, Inc. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -90,27 +90,27 @@ | | | @@ -90,27 +90,27 @@ |
90 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 90 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
91 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 91 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
92 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC | | 92 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC |
93 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 93 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
94 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 94 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
95 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 95 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
96 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 96 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
97 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 97 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
98 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 98 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
99 | * POSSIBILITY OF SUCH DAMAGE. | | 99 | * POSSIBILITY OF SUCH DAMAGE. |
100 | */ | | 100 | */ |
101 | | | 101 | |
102 | #include <sys/cdefs.h> | | 102 | #include <sys/cdefs.h> |
103 | __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.212 2010/08/07 09:41:19 jruoho Exp $"); | | 103 | __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.213 2010/08/07 17:12:55 jruoho Exp $"); |
104 | | | 104 | |
105 | #include "opt_acpi.h" | | 105 | #include "opt_acpi.h" |
106 | #include "opt_pcifixup.h" | | 106 | #include "opt_pcifixup.h" |
107 | | | 107 | |
108 | #include <sys/param.h> | | 108 | #include <sys/param.h> |
109 | #include <sys/device.h> | | 109 | #include <sys/device.h> |
110 | #include <sys/kernel.h> | | 110 | #include <sys/kernel.h> |
111 | #include <sys/malloc.h> | | 111 | #include <sys/malloc.h> |
112 | #include <sys/module.h> | | 112 | #include <sys/module.h> |
113 | #include <sys/mutex.h> | | 113 | #include <sys/mutex.h> |
114 | #include <sys/sysctl.h> | | 114 | #include <sys/sysctl.h> |
115 | #include <sys/systm.h> | | 115 | #include <sys/systm.h> |
116 | #include <sys/timetc.h> | | 116 | #include <sys/timetc.h> |
| @@ -153,27 +153,27 @@ static int acpi_dbgr = 0x00; | | | @@ -153,27 +153,27 @@ static int acpi_dbgr = 0x00; |
153 | * dependent code may wish to skip other steps (such as attaching | | 153 | * dependent code may wish to skip other steps (such as attaching |
154 | * subsystems that ACPI supercedes) when ACPI is active. | | 154 | * subsystems that ACPI supercedes) when ACPI is active. |
155 | */ | | 155 | */ |
156 | int acpi_active; | | 156 | int acpi_active; |
157 | int acpi_force_load; | | 157 | int acpi_force_load; |
158 | int acpi_suspended = 0; | | 158 | int acpi_suspended = 0; |
159 | int acpi_verbose_loaded = 0; | | 159 | int acpi_verbose_loaded = 0; |
160 | | | 160 | |
161 | struct acpi_softc *acpi_softc; | | 161 | struct acpi_softc *acpi_softc; |
162 | static uint64_t acpi_root_pointer; | | 162 | static uint64_t acpi_root_pointer; |
163 | extern kmutex_t acpi_interrupt_list_mtx; | | 163 | extern kmutex_t acpi_interrupt_list_mtx; |
164 | extern struct cfdriver acpi_cd; | | 164 | extern struct cfdriver acpi_cd; |
165 | static ACPI_HANDLE acpi_scopes[4]; | | 165 | static ACPI_HANDLE acpi_scopes[4]; |
166 | static ACPI_TABLE_HEADER *madt_header; | | 166 | ACPI_TABLE_HEADER *madt_header; |
167 | | | 167 | |
168 | /* | | 168 | /* |
169 | * This structure provides a context for the ACPI | | 169 | * This structure provides a context for the ACPI |
170 | * namespace walk performed in acpi_build_tree(). | | 170 | * namespace walk performed in acpi_build_tree(). |
171 | */ | | 171 | */ |
172 | struct acpi_walkcontext { | | 172 | struct acpi_walkcontext { |
173 | struct acpi_softc *aw_sc; | | 173 | struct acpi_softc *aw_sc; |
174 | struct acpi_devnode *aw_parent; | | 174 | struct acpi_devnode *aw_parent; |
175 | }; | | 175 | }; |
176 | | | 176 | |
177 | /* | | 177 | /* |
178 | * Ignored HIDs. | | 178 | * Ignored HIDs. |
179 | */ | | 179 | */ |