aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events')
-rw-r--r--drivers/acpi/events/evgpe.c5
-rw-r--r--drivers/acpi/events/evgpeblk.c3
-rw-r--r--drivers/acpi/events/evmisc.c20
-rw-r--r--drivers/acpi/events/evregion.c15
-rw-r--r--drivers/acpi/events/evrgnini.c3
-rw-r--r--drivers/acpi/events/evxface.c7
-rw-r--r--drivers/acpi/events/evxfevnt.c2
7 files changed, 21 insertions, 34 deletions
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index 635ba449ebc2..e22f4a973c0f 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -341,9 +341,8 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
341 341
342 /* A Non-NULL gpe_device means this is a GPE Block Device */ 342 /* A Non-NULL gpe_device means this is a GPE Block Device */
343 343
344 obj_desc = 344 obj_desc = acpi_ns_get_attached_object((struct acpi_namespace_node *)
345 acpi_ns_get_attached_object((struct acpi_namespace_node *) 345 gpe_device);
346 gpe_device);
347 if (!obj_desc || !obj_desc->device.gpe_block) { 346 if (!obj_desc || !obj_desc->device.gpe_block) {
348 return (NULL); 347 return (NULL);
349 } 348 }
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index ad5bc76edf46..902c287b3a4f 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -1033,8 +1033,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
1033 1033
1034 if (((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == 1034 if (((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
1035 ACPI_GPE_DISPATCH_METHOD) 1035 ACPI_GPE_DISPATCH_METHOD)
1036 && (gpe_event_info-> 1036 && (gpe_event_info->flags & ACPI_GPE_TYPE_RUNTIME)) {
1037 flags & ACPI_GPE_TYPE_RUNTIME)) {
1038 gpe_enabled_count++; 1037 gpe_enabled_count++;
1039 } 1038 }
1040 1039
diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c
index cae786ca8600..21cb749d0c75 100644
--- a/drivers/acpi/events/evmisc.c
+++ b/drivers/acpi/events/evmisc.c
@@ -196,15 +196,12 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
196 notify_info->notify.value = (u16) notify_value; 196 notify_info->notify.value = (u16) notify_value;
197 notify_info->notify.handler_obj = handler_obj; 197 notify_info->notify.handler_obj = handler_obj;
198 198
199 acpi_ex_exit_interpreter(); 199 status =
200 200 acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_ev_notify_dispatch,
201 acpi_ev_notify_dispatch(notify_info); 201 notify_info);
202
203 status = acpi_ex_enter_interpreter();
204 if (ACPI_FAILURE(status)) { 202 if (ACPI_FAILURE(status)) {
205 return_ACPI_STATUS(status); 203 acpi_ut_delete_generic_state(notify_info);
206 } 204 }
207
208 } 205 }
209 206
210 if (!handler_obj) { 207 if (!handler_obj) {
@@ -323,8 +320,9 @@ static u32 acpi_ev_global_lock_handler(void *context)
323 acpi_gbl_global_lock_acquired = TRUE; 320 acpi_gbl_global_lock_acquired = TRUE;
324 /* Send a unit to the semaphore */ 321 /* Send a unit to the semaphore */
325 322
326 if (ACPI_FAILURE(acpi_os_signal_semaphore( 323 if (ACPI_FAILURE
327 acpi_gbl_global_lock_semaphore, 1))) { 324 (acpi_os_signal_semaphore
325 (acpi_gbl_global_lock_semaphore, 1))) {
328 ACPI_ERROR((AE_INFO, 326 ACPI_ERROR((AE_INFO,
329 "Could not signal Global Lock semaphore")); 327 "Could not signal Global Lock semaphore"));
330 } 328 }
@@ -450,7 +448,9 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
450 } 448 }
451 449
452 if (ACPI_FAILURE(status)) { 450 if (ACPI_FAILURE(status)) {
453 status = acpi_ex_system_wait_mutex(acpi_gbl_global_lock_mutex, timeout); 451 status =
452 acpi_ex_system_wait_mutex(acpi_gbl_global_lock_mutex,
453 timeout);
454 } 454 }
455 if (ACPI_FAILURE(status)) { 455 if (ACPI_FAILURE(status)) {
456 return_ACPI_STATUS(status); 456 return_ACPI_STATUS(status);
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c
index 96b0e8431748..e99f0c435a47 100644
--- a/drivers/acpi/events/evregion.c
+++ b/drivers/acpi/events/evregion.c
@@ -291,7 +291,6 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
291 u32 bit_width, acpi_integer * value) 291 u32 bit_width, acpi_integer * value)
292{ 292{
293 acpi_status status; 293 acpi_status status;
294 acpi_status status2;
295 acpi_adr_space_handler handler; 294 acpi_adr_space_handler handler;
296 acpi_adr_space_setup region_setup; 295 acpi_adr_space_setup region_setup;
297 union acpi_operand_object *handler_desc; 296 union acpi_operand_object *handler_desc;
@@ -345,7 +344,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
345 * setup will potentially execute control methods 344 * setup will potentially execute control methods
346 * (e.g., _REG method for this region) 345 * (e.g., _REG method for this region)
347 */ 346 */
348 acpi_ex_exit_interpreter(); 347 acpi_ex_relinquish_interpreter();
349 348
350 status = region_setup(region_obj, ACPI_REGION_ACTIVATE, 349 status = region_setup(region_obj, ACPI_REGION_ACTIVATE,
351 handler_desc->address_space.context, 350 handler_desc->address_space.context,
@@ -353,10 +352,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
353 352
354 /* Re-enter the interpreter */ 353 /* Re-enter the interpreter */
355 354
356 status2 = acpi_ex_enter_interpreter(); 355 acpi_ex_reacquire_interpreter();
357 if (ACPI_FAILURE(status2)) {
358 return_ACPI_STATUS(status2);
359 }
360 356
361 /* Check for failure of the Region Setup */ 357 /* Check for failure of the Region Setup */
362 358
@@ -409,7 +405,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
409 * exit the interpreter because the handler *might* block -- we don't 405 * exit the interpreter because the handler *might* block -- we don't
410 * know what it will do, so we can't hold the lock on the intepreter. 406 * know what it will do, so we can't hold the lock on the intepreter.
411 */ 407 */
412 acpi_ex_exit_interpreter(); 408 acpi_ex_relinquish_interpreter();
413 } 409 }
414 410
415 /* Call the handler */ 411 /* Call the handler */
@@ -430,10 +426,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
430 * We just returned from a non-default handler, we must re-enter the 426 * We just returned from a non-default handler, we must re-enter the
431 * interpreter 427 * interpreter
432 */ 428 */
433 status2 = acpi_ex_enter_interpreter(); 429 acpi_ex_reacquire_interpreter();
434 if (ACPI_FAILURE(status2)) {
435 return_ACPI_STATUS(status2);
436 }
437 } 430 }
438 431
439 return_ACPI_STATUS(status); 432 return_ACPI_STATUS(status);
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
index a4fa7e6822a3..400d90fca966 100644
--- a/drivers/acpi/events/evrgnini.c
+++ b/drivers/acpi/events/evrgnini.c
@@ -228,7 +228,8 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
228 228
229 /* Install a handler for this PCI root bridge */ 229 /* Install a handler for this PCI root bridge */
230 230
231 status = acpi_install_address_space_handler((acpi_handle) pci_root_node, ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL); 231 status =
232 acpi_install_address_space_handler((acpi_handle) pci_root_node, ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL);
232 if (ACPI_FAILURE(status)) { 233 if (ACPI_FAILURE(status)) {
233 if (status == AE_SAME_HANDLER) { 234 if (status == AE_SAME_HANDLER) {
234 /* 235 /*
diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c
index a3379bafa676..6d866a01f5f4 100644
--- a/drivers/acpi/events/evxface.c
+++ b/drivers/acpi/events/evxface.c
@@ -91,7 +91,6 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
91 91
92ACPI_EXPORT_SYMBOL(acpi_install_exception_handler) 92ACPI_EXPORT_SYMBOL(acpi_install_exception_handler)
93#endif /* ACPI_FUTURE_USAGE */ 93#endif /* ACPI_FUTURE_USAGE */
94
95/******************************************************************************* 94/*******************************************************************************
96 * 95 *
97 * FUNCTION: acpi_install_fixed_event_handler 96 * FUNCTION: acpi_install_fixed_event_handler
@@ -768,11 +767,9 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle)
768 return (AE_BAD_PARAMETER); 767 return (AE_BAD_PARAMETER);
769 } 768 }
770 769
771 status = acpi_ex_enter_interpreter(); 770 /* Must lock interpreter to prevent race conditions */
772 if (ACPI_FAILURE(status)) {
773 return (status);
774 }
775 771
772 acpi_ex_enter_interpreter();
776 status = acpi_ev_acquire_global_lock(timeout); 773 status = acpi_ev_acquire_global_lock(timeout);
777 acpi_ex_exit_interpreter(); 774 acpi_ex_exit_interpreter();
778 775
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index 17065e98807c..9cbd3414a574 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -472,7 +472,6 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
472} 472}
473 473
474ACPI_EXPORT_SYMBOL(acpi_clear_gpe) 474ACPI_EXPORT_SYMBOL(acpi_clear_gpe)
475
476#ifdef ACPI_FUTURE_USAGE 475#ifdef ACPI_FUTURE_USAGE
477/******************************************************************************* 476/*******************************************************************************
478 * 477 *
@@ -568,7 +567,6 @@ acpi_get_gpe_status(acpi_handle gpe_device,
568 567
569ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) 568ACPI_EXPORT_SYMBOL(acpi_get_gpe_status)
570#endif /* ACPI_FUTURE_USAGE */ 569#endif /* ACPI_FUTURE_USAGE */
571
572/******************************************************************************* 570/*******************************************************************************
573 * 571 *
574 * FUNCTION: acpi_install_gpe_block 572 * FUNCTION: acpi_install_gpe_block