diff options
Diffstat (limited to 'drivers/acpi/events/evgpeblk.c')
-rw-r--r-- | drivers/acpi/events/evgpeblk.c | 27 |
1 files changed, 15 insertions, 12 deletions
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 | ||
149 | acpi_status | 148 | acpi_status |
150 | acpi_ev_walk_gpe_list ( | 149 | acpi_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 | ||
675 | unlock_and_exit: | 677 | unlock_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 */ |