aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-06-08 16:29:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-14 02:45:47 -0400
commit4c90ece249992c7a2e3fc921e5cdb8eb92193067 (patch)
treee145ffe472802ef870ba1eaea150b688c19e45ca /drivers/acpi/events
parent4119532c95547821dbe72d6916dfa1b2148475b3 (diff)
ACPI: ACPICA 20060608
Converted the locking mutex used for the ACPI hardware to a spinlock. This change should eliminate all problems caused by attempting to acquire a semaphore at interrupt level, and it means that all ACPICA external interfaces that directly access the ACPI hardware can be safely called from interrupt level. Fixed a regression introduced in 20060526 where the ACPI device initialization could be prematurely aborted with an AE_NOT_FOUND if a device did not have an optional _INI method. Fixed an IndexField issue where a write to the Data Register should be limited in size to the AccessSize (width) of the IndexField itself. (BZ 433, Fiodor Suietov) Fixed problem reports (Valery Podrezov) integrated: - Allow store of ThermalZone objects to Debug object. http://bugzilla.kernel.org/show_bug.cgi?id=5369 http://bugzilla.kernel.org/show_bug.cgi?id=5370 Fixed problem reports (Fiodor Suietov) integrated: - acpi_get_table_header() doesn't handle multiple instances correctly (BZ 364) Removed four global mutexes that were obsolete and were no longer being used. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/events')
-rw-r--r--drivers/acpi/events/evgpe.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index 23fe53ba7375..f01d339407f8 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -382,6 +382,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
382 u32 status_reg; 382 u32 status_reg;
383 u32 enable_reg; 383 u32 enable_reg;
384 acpi_cpu_flags flags; 384 acpi_cpu_flags flags;
385 acpi_cpu_flags hw_flags;
385 acpi_native_uint i; 386 acpi_native_uint i;
386 acpi_native_uint j; 387 acpi_native_uint j;
387 388
@@ -393,9 +394,12 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
393 return (int_status); 394 return (int_status);
394 } 395 }
395 396
396 /* Examine all GPE blocks attached to this interrupt level */ 397 /* We need to hold the GPE lock now, hardware lock in the loop */
397 398
398 flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); 399 flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
400
401 /* Examine all GPE blocks attached to this interrupt level */
402
399 gpe_block = gpe_xrupt_list->gpe_block_list_head; 403 gpe_block = gpe_xrupt_list->gpe_block_list_head;
400 while (gpe_block) { 404 while (gpe_block) {
401 /* 405 /*
@@ -409,6 +413,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
409 413
410 gpe_register_info = &gpe_block->register_info[i]; 414 gpe_register_info = &gpe_block->register_info[i];
411 415
416 hw_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock);
417
412 /* Read the Status Register */ 418 /* Read the Status Register */
413 419
414 status = 420 status =
@@ -417,6 +423,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
417 &gpe_register_info-> 423 &gpe_register_info->
418 status_address); 424 status_address);
419 if (ACPI_FAILURE(status)) { 425 if (ACPI_FAILURE(status)) {
426 acpi_os_release_lock(acpi_gbl_hardware_lock,
427 hw_flags);
420 goto unlock_and_exit; 428 goto unlock_and_exit;
421 } 429 }
422 430
@@ -427,6 +435,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
427 &enable_reg, 435 &enable_reg,
428 &gpe_register_info-> 436 &gpe_register_info->
429 enable_address); 437 enable_address);
438 acpi_os_release_lock(acpi_gbl_hardware_lock, hw_flags);
439
430 if (ACPI_FAILURE(status)) { 440 if (ACPI_FAILURE(status)) {
431 goto unlock_and_exit; 441 goto unlock_and_exit;
432 } 442 }
@@ -499,7 +509,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
499static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) 509static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
500{ 510{
501 struct acpi_gpe_event_info *gpe_event_info = (void *)context; 511 struct acpi_gpe_event_info *gpe_event_info = (void *)context;
502 u32 gpe_number = 0;
503 acpi_status status; 512 acpi_status status;
504 struct acpi_gpe_event_info local_gpe_event_info; 513 struct acpi_gpe_event_info local_gpe_event_info;
505 struct acpi_evaluate_info *info; 514 struct acpi_evaluate_info *info;
@@ -565,10 +574,10 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
565 574
566 if (ACPI_FAILURE(status)) { 575 if (ACPI_FAILURE(status)) {
567 ACPI_EXCEPTION((AE_INFO, status, 576 ACPI_EXCEPTION((AE_INFO, status,
568 "While evaluating method [%4.4s] for GPE[%2X]", 577 "While evaluating GPE method [%4.4s]",
569 acpi_ut_get_node_name 578 acpi_ut_get_node_name
570 (local_gpe_event_info.dispatch. 579 (local_gpe_event_info.dispatch.
571 method_node), gpe_number)); 580 method_node)));
572 } 581 }
573 } 582 }
574 583