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.c27
-rw-r--r--drivers/acpi/events/evmisc.c4
-rw-r--r--drivers/acpi/events/evxface.c10
4 files changed, 26 insertions, 20 deletions
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index 081120b109ba..ede834df4f69 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -396,6 +396,7 @@ acpi_ev_gpe_detect (
396 struct acpi_gpe_register_info *gpe_register_info; 396 struct acpi_gpe_register_info *gpe_register_info;
397 u32 status_reg; 397 u32 status_reg;
398 u32 enable_reg; 398 u32 enable_reg;
399 u32 flags;
399 acpi_status status; 400 acpi_status status;
400 struct acpi_gpe_block_info *gpe_block; 401 struct acpi_gpe_block_info *gpe_block;
401 acpi_native_uint i; 402 acpi_native_uint i;
@@ -412,7 +413,7 @@ acpi_ev_gpe_detect (
412 413
413 /* Examine all GPE blocks attached to this interrupt level */ 414 /* Examine all GPE blocks attached to this interrupt level */
414 415
415 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_ISR); 416 flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
416 gpe_block = gpe_xrupt_list->gpe_block_list_head; 417 gpe_block = gpe_xrupt_list->gpe_block_list_head;
417 while (gpe_block) { 418 while (gpe_block) {
418 /* 419 /*
@@ -476,7 +477,7 @@ acpi_ev_gpe_detect (
476 477
477unlock_and_exit: 478unlock_and_exit:
478 479
479 acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_ISR); 480 acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
480 return (int_status); 481 return (int_status);
481} 482}
482 483
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index ee5419b8f1b1..dfc54692b127 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -138,7 +138,6 @@ acpi_ev_valid_gpe_event (
138 * FUNCTION: acpi_ev_walk_gpe_list 138 * FUNCTION: acpi_ev_walk_gpe_list
139 * 139 *
140 * PARAMETERS: gpe_walk_callback - Routine called for each GPE block 140 * PARAMETERS: gpe_walk_callback - Routine called for each GPE block
141 * Flags - ACPI_NOT_ISR or ACPI_ISR
142 * 141 *
143 * RETURN: Status 142 * RETURN: Status
144 * 143 *
@@ -148,18 +147,18 @@ acpi_ev_valid_gpe_event (
148 147
149acpi_status 148acpi_status
150acpi_ev_walk_gpe_list ( 149acpi_ev_walk_gpe_list (
151 ACPI_GPE_CALLBACK gpe_walk_callback, 150 ACPI_GPE_CALLBACK gpe_walk_callback)
152 u32 flags)
153{ 151{
154 struct acpi_gpe_block_info *gpe_block; 152 struct acpi_gpe_block_info *gpe_block;
155 struct acpi_gpe_xrupt_info *gpe_xrupt_info; 153 struct acpi_gpe_xrupt_info *gpe_xrupt_info;
156 acpi_status status = AE_OK; 154 acpi_status status = AE_OK;
155 u32 flags;
157 156
158 157
159 ACPI_FUNCTION_TRACE ("ev_walk_gpe_list"); 158 ACPI_FUNCTION_TRACE ("ev_walk_gpe_list");
160 159
161 160
162 acpi_os_acquire_lock (acpi_gbl_gpe_lock, flags); 161 flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
163 162
164 /* Walk the interrupt level descriptor list */ 163 /* Walk the interrupt level descriptor list */
165 164
@@ -500,6 +499,7 @@ acpi_ev_get_gpe_xrupt_block (
500 struct acpi_gpe_xrupt_info *next_gpe_xrupt; 499 struct acpi_gpe_xrupt_info *next_gpe_xrupt;
501 struct acpi_gpe_xrupt_info *gpe_xrupt; 500 struct acpi_gpe_xrupt_info *gpe_xrupt;
502 acpi_status status; 501 acpi_status status;
502 u32 flags;
503 503
504 504
505 ACPI_FUNCTION_TRACE ("ev_get_gpe_xrupt_block"); 505 ACPI_FUNCTION_TRACE ("ev_get_gpe_xrupt_block");
@@ -527,7 +527,7 @@ acpi_ev_get_gpe_xrupt_block (
527 527
528 /* Install new interrupt descriptor with spin lock */ 528 /* Install new interrupt descriptor with spin lock */
529 529
530 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 530 flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
531 if (acpi_gbl_gpe_xrupt_list_head) { 531 if (acpi_gbl_gpe_xrupt_list_head) {
532 next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head; 532 next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
533 while (next_gpe_xrupt->next) { 533 while (next_gpe_xrupt->next) {
@@ -540,7 +540,7 @@ acpi_ev_get_gpe_xrupt_block (
540 else { 540 else {
541 acpi_gbl_gpe_xrupt_list_head = gpe_xrupt; 541 acpi_gbl_gpe_xrupt_list_head = gpe_xrupt;
542 } 542 }
543 acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 543 acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
544 544
545 /* Install new interrupt handler if not SCI_INT */ 545 /* Install new interrupt handler if not SCI_INT */
546 546
@@ -577,6 +577,7 @@ acpi_ev_delete_gpe_xrupt (
577 struct acpi_gpe_xrupt_info *gpe_xrupt) 577 struct acpi_gpe_xrupt_info *gpe_xrupt)
578{ 578{
579 acpi_status status; 579 acpi_status status;
580 u32 flags;
580 581
581 582
582 ACPI_FUNCTION_TRACE ("ev_delete_gpe_xrupt"); 583 ACPI_FUNCTION_TRACE ("ev_delete_gpe_xrupt");
@@ -599,7 +600,7 @@ acpi_ev_delete_gpe_xrupt (
599 600
600 /* Unlink the interrupt block with lock */ 601 /* Unlink the interrupt block with lock */
601 602
602 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 603 flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
603 if (gpe_xrupt->previous) { 604 if (gpe_xrupt->previous) {
604 gpe_xrupt->previous->next = gpe_xrupt->next; 605 gpe_xrupt->previous->next = gpe_xrupt->next;
605 } 606 }
@@ -607,7 +608,7 @@ acpi_ev_delete_gpe_xrupt (
607 if (gpe_xrupt->next) { 608 if (gpe_xrupt->next) {
608 gpe_xrupt->next->previous = gpe_xrupt->previous; 609 gpe_xrupt->next->previous = gpe_xrupt->previous;
609 } 610 }
610 acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 611 acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
611 612
612 /* Free the block */ 613 /* Free the block */
613 614
@@ -637,6 +638,7 @@ acpi_ev_install_gpe_block (
637 struct acpi_gpe_block_info *next_gpe_block; 638 struct acpi_gpe_block_info *next_gpe_block;
638 struct acpi_gpe_xrupt_info *gpe_xrupt_block; 639 struct acpi_gpe_xrupt_info *gpe_xrupt_block;
639 acpi_status status; 640 acpi_status status;
641 u32 flags;
640 642
641 643
642 ACPI_FUNCTION_TRACE ("ev_install_gpe_block"); 644 ACPI_FUNCTION_TRACE ("ev_install_gpe_block");
@@ -655,7 +657,7 @@ acpi_ev_install_gpe_block (
655 657
656 /* Install the new block at the end of the list with lock */ 658 /* Install the new block at the end of the list with lock */
657 659
658 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 660 flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
659 if (gpe_xrupt_block->gpe_block_list_head) { 661 if (gpe_xrupt_block->gpe_block_list_head) {
660 next_gpe_block = gpe_xrupt_block->gpe_block_list_head; 662 next_gpe_block = gpe_xrupt_block->gpe_block_list_head;
661 while (next_gpe_block->next) { 663 while (next_gpe_block->next) {
@@ -670,7 +672,7 @@ acpi_ev_install_gpe_block (
670 } 672 }
671 673
672 gpe_block->xrupt_block = gpe_xrupt_block; 674 gpe_block->xrupt_block = gpe_xrupt_block;
673 acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 675 acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
674 676
675unlock_and_exit: 677unlock_and_exit:
676 status = acpi_ut_release_mutex (ACPI_MTX_EVENTS); 678 status = acpi_ut_release_mutex (ACPI_MTX_EVENTS);
@@ -695,6 +697,7 @@ acpi_ev_delete_gpe_block (
695 struct acpi_gpe_block_info *gpe_block) 697 struct acpi_gpe_block_info *gpe_block)
696{ 698{
697 acpi_status status; 699 acpi_status status;
700 u32 flags;
698 701
699 702
700 ACPI_FUNCTION_TRACE ("ev_install_gpe_block"); 703 ACPI_FUNCTION_TRACE ("ev_install_gpe_block");
@@ -720,7 +723,7 @@ acpi_ev_delete_gpe_block (
720 else { 723 else {
721 /* Remove the block on this interrupt with lock */ 724 /* Remove the block on this interrupt with lock */
722 725
723 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 726 flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
724 if (gpe_block->previous) { 727 if (gpe_block->previous) {
725 gpe_block->previous->next = gpe_block->next; 728 gpe_block->previous->next = gpe_block->next;
726 } 729 }
@@ -731,7 +734,7 @@ acpi_ev_delete_gpe_block (
731 if (gpe_block->next) { 734 if (gpe_block->next) {
732 gpe_block->next->previous = gpe_block->previous; 735 gpe_block->next->previous = gpe_block->previous;
733 } 736 }
734 acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 737 acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
735 } 738 }
736 739
737 /* Free the gpe_block */ 740 /* Free the gpe_block */
diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c
index 659e90956112..38d7ab8aef3a 100644
--- a/drivers/acpi/events/evmisc.c
+++ b/drivers/acpi/events/evmisc.c
@@ -589,7 +589,7 @@ acpi_ev_terminate (
589 589
590 /* Disable all GPEs in all GPE blocks */ 590 /* Disable all GPEs in all GPE blocks */
591 591
592 status = acpi_ev_walk_gpe_list (acpi_hw_disable_gpe_block, ACPI_NOT_ISR); 592 status = acpi_ev_walk_gpe_list (acpi_hw_disable_gpe_block);
593 593
594 /* Remove SCI handler */ 594 /* Remove SCI handler */
595 595
@@ -602,7 +602,7 @@ acpi_ev_terminate (
602 602
603 /* Deallocate all handler objects installed within GPE info structs */ 603 /* Deallocate all handler objects installed within GPE info structs */
604 604
605 status = acpi_ev_walk_gpe_list (acpi_ev_delete_gpe_handlers, ACPI_NOT_ISR); 605 status = acpi_ev_walk_gpe_list (acpi_ev_delete_gpe_handlers);
606 606
607 /* Return to original mode if necessary */ 607 /* Return to original mode if necessary */
608 608
diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c
index 4092d47f6758..4c1c25e316a8 100644
--- a/drivers/acpi/events/evxface.c
+++ b/drivers/acpi/events/evxface.c
@@ -591,6 +591,7 @@ acpi_install_gpe_handler (
591 struct acpi_gpe_event_info *gpe_event_info; 591 struct acpi_gpe_event_info *gpe_event_info;
592 struct acpi_handler_info *handler; 592 struct acpi_handler_info *handler;
593 acpi_status status; 593 acpi_status status;
594 u32 flags;
594 595
595 596
596 ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler"); 597 ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler");
@@ -643,7 +644,7 @@ acpi_install_gpe_handler (
643 644
644 /* Install the handler */ 645 /* Install the handler */
645 646
646 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 647 flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
647 gpe_event_info->dispatch.handler = handler; 648 gpe_event_info->dispatch.handler = handler;
648 649
649 /* Setup up dispatch flags to indicate handler (vs. method) */ 650 /* Setup up dispatch flags to indicate handler (vs. method) */
@@ -651,7 +652,7 @@ acpi_install_gpe_handler (
651 gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); /* Clear bits */ 652 gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); /* Clear bits */
652 gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER); 653 gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER);
653 654
654 acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 655 acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
655 656
656 657
657unlock_and_exit: 658unlock_and_exit:
@@ -685,6 +686,7 @@ acpi_remove_gpe_handler (
685 struct acpi_gpe_event_info *gpe_event_info; 686 struct acpi_gpe_event_info *gpe_event_info;
686 struct acpi_handler_info *handler; 687 struct acpi_handler_info *handler;
687 acpi_status status; 688 acpi_status status;
689 u32 flags;
688 690
689 691
690 ACPI_FUNCTION_TRACE ("acpi_remove_gpe_handler"); 692 ACPI_FUNCTION_TRACE ("acpi_remove_gpe_handler");
@@ -741,7 +743,7 @@ acpi_remove_gpe_handler (
741 743
742 /* Remove the handler */ 744 /* Remove the handler */
743 745
744 acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 746 flags = acpi_os_acquire_lock (acpi_gbl_gpe_lock);
745 handler = gpe_event_info->dispatch.handler; 747 handler = gpe_event_info->dispatch.handler;
746 748
747 /* Restore Method node (if any), set dispatch flags */ 749 /* Restore Method node (if any), set dispatch flags */
@@ -751,7 +753,7 @@ acpi_remove_gpe_handler (
751 if (handler->method_node) { 753 if (handler->method_node) {
752 gpe_event_info->flags |= ACPI_GPE_DISPATCH_METHOD; 754 gpe_event_info->flags |= ACPI_GPE_DISPATCH_METHOD;
753 } 755 }
754 acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR); 756 acpi_os_release_lock (acpi_gbl_gpe_lock, flags);
755 757
756 /* Now we can free the handler object */ 758 /* Now we can free the handler object */
757 759