diff options
Diffstat (limited to 'drivers/acpi/utilities/utxface.c')
-rw-r--r-- | drivers/acpi/utilities/utxface.c | 52 |
1 files changed, 38 insertions, 14 deletions
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c index f06bd5e5e9d1..57adc5bc02f3 100644 --- a/drivers/acpi/utilities/utxface.c +++ b/drivers/acpi/utilities/utxface.c | |||
@@ -178,10 +178,14 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
178 | /* | 178 | /* |
179 | * Initialize ACPI Event handling (Fixed and General Purpose) | 179 | * Initialize ACPI Event handling (Fixed and General Purpose) |
180 | * | 180 | * |
181 | * NOTE: We must have the hardware AND events initialized before we can | 181 | * Note1: We must have the hardware and events initialized before we can |
182 | * execute ANY control methods SAFELY. Any control method can require | 182 | * execute any control methods safely. Any control method can require |
183 | * ACPI hardware support, so the hardware MUST be initialized before | 183 | * ACPI hardware support, so the hardware must be fully initialized before |
184 | * execution! | 184 | * any method execution! |
185 | * | ||
186 | * Note2: Fixed events are initialized and enabled here. GPEs are | ||
187 | * initialized, but cannot be enabled until after the hardware is | ||
188 | * completely initialized (SCI and global_lock activated) | ||
185 | */ | 189 | */ |
186 | if (!(flags & ACPI_NO_EVENT_INIT)) { | 190 | if (!(flags & ACPI_NO_EVENT_INIT)) { |
187 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 191 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
@@ -193,8 +197,10 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
193 | } | 197 | } |
194 | } | 198 | } |
195 | 199 | ||
196 | /* Install the SCI handler and Global Lock handler */ | 200 | /* |
197 | 201 | * Install the SCI handler and Global Lock handler. This completes the | |
202 | * hardware initialization. | ||
203 | */ | ||
198 | if (!(flags & ACPI_NO_HANDLER_INIT)) { | 204 | if (!(flags & ACPI_NO_HANDLER_INIT)) { |
199 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 205 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
200 | "[Init] Installing SCI/GL handlers\n")); | 206 | "[Init] Installing SCI/GL handlers\n")); |
@@ -205,6 +211,24 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
205 | } | 211 | } |
206 | } | 212 | } |
207 | 213 | ||
214 | /* | ||
215 | * Complete the GPE initialization for the GPE blocks defined in the FADT | ||
216 | * (GPE block 0 and 1). | ||
217 | * | ||
218 | * Note1: This is where the _PRW methods are executed for the GPEs. These | ||
219 | * methods can only be executed after the SCI and Global Lock handlers are | ||
220 | * installed and initialized. | ||
221 | * | ||
222 | * Note2: Currently, there seems to be no need to run the _REG methods | ||
223 | * before execution of the _PRW methods and enabling of the GPEs. | ||
224 | */ | ||
225 | if (!(flags & ACPI_NO_EVENT_INIT)) { | ||
226 | status = acpi_ev_install_fadt_gpes(); | ||
227 | if (ACPI_FAILURE(status)) { | ||
228 | return (status); | ||
229 | } | ||
230 | } | ||
231 | |||
208 | return_ACPI_STATUS(status); | 232 | return_ACPI_STATUS(status); |
209 | } | 233 | } |
210 | 234 | ||
@@ -230,9 +254,9 @@ acpi_status acpi_initialize_objects(u32 flags) | |||
230 | /* | 254 | /* |
231 | * Run all _REG methods | 255 | * Run all _REG methods |
232 | * | 256 | * |
233 | * NOTE: Any objects accessed | 257 | * Note: Any objects accessed by the _REG methods will be automatically |
234 | * by the _REG methods will be automatically initialized, even if they | 258 | * initialized, even if they contain executable AML (see the call to |
235 | * contain executable AML (see call to acpi_ns_initialize_objects below). | 259 | * acpi_ns_initialize_objects below). |
236 | */ | 260 | */ |
237 | if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) { | 261 | if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) { |
238 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 262 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
@@ -245,9 +269,9 @@ acpi_status acpi_initialize_objects(u32 flags) | |||
245 | } | 269 | } |
246 | 270 | ||
247 | /* | 271 | /* |
248 | * Initialize the objects that remain uninitialized. This | 272 | * Initialize the objects that remain uninitialized. This runs the |
249 | * runs the executable AML that may be part of the declaration of these | 273 | * executable AML that may be part of the declaration of these objects: |
250 | * objects: operation_regions, buffer_fields, Buffers, and Packages. | 274 | * operation_regions, buffer_fields, Buffers, and Packages. |
251 | */ | 275 | */ |
252 | if (!(flags & ACPI_NO_OBJECT_INIT)) { | 276 | if (!(flags & ACPI_NO_OBJECT_INIT)) { |
253 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 277 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
@@ -260,8 +284,8 @@ acpi_status acpi_initialize_objects(u32 flags) | |||
260 | } | 284 | } |
261 | 285 | ||
262 | /* | 286 | /* |
263 | * Initialize all device objects in the namespace | 287 | * Initialize all device objects in the namespace. This runs the device |
264 | * This runs the _STA and _INI methods. | 288 | * _STA and _INI methods. |
265 | */ | 289 | */ |
266 | if (!(flags & ACPI_NO_DEVICE_INIT)) { | 290 | if (!(flags & ACPI_NO_DEVICE_INIT)) { |
267 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 291 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |