aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events')
-rw-r--r--drivers/acpi/events/evgpeblk.c36
-rw-r--r--drivers/acpi/events/evrgnini.c10
-rw-r--r--drivers/acpi/events/evxfevnt.c6
3 files changed, 28 insertions, 24 deletions
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index 84186a7d17b2..ee5419b8f1b1 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -66,7 +66,7 @@ acpi_ev_match_prw_and_gpe (
66 66
67static struct acpi_gpe_xrupt_info * 67static struct acpi_gpe_xrupt_info *
68acpi_ev_get_gpe_xrupt_block ( 68acpi_ev_get_gpe_xrupt_block (
69 u32 interrupt_level); 69 u32 interrupt_number);
70 70
71static acpi_status 71static acpi_status
72acpi_ev_delete_gpe_xrupt ( 72acpi_ev_delete_gpe_xrupt (
@@ -75,7 +75,7 @@ acpi_ev_delete_gpe_xrupt (
75static acpi_status 75static acpi_status
76acpi_ev_install_gpe_block ( 76acpi_ev_install_gpe_block (
77 struct acpi_gpe_block_info *gpe_block, 77 struct acpi_gpe_block_info *gpe_block,
78 u32 interrupt_level); 78 u32 interrupt_number);
79 79
80static acpi_status 80static acpi_status
81acpi_ev_create_gpe_info_blocks ( 81acpi_ev_create_gpe_info_blocks (
@@ -482,7 +482,7 @@ cleanup:
482 * 482 *
483 * FUNCTION: acpi_ev_get_gpe_xrupt_block 483 * FUNCTION: acpi_ev_get_gpe_xrupt_block
484 * 484 *
485 * PARAMETERS: interrupt_level - Interrupt for a GPE block 485 * PARAMETERS: interrupt_number - Interrupt for a GPE block
486 * 486 *
487 * RETURN: A GPE interrupt block 487 * RETURN: A GPE interrupt block
488 * 488 *
@@ -495,7 +495,7 @@ cleanup:
495 495
496static struct acpi_gpe_xrupt_info * 496static struct acpi_gpe_xrupt_info *
497acpi_ev_get_gpe_xrupt_block ( 497acpi_ev_get_gpe_xrupt_block (
498 u32 interrupt_level) 498 u32 interrupt_number)
499{ 499{
500 struct acpi_gpe_xrupt_info *next_gpe_xrupt; 500 struct acpi_gpe_xrupt_info *next_gpe_xrupt;
501 struct acpi_gpe_xrupt_info *gpe_xrupt; 501 struct acpi_gpe_xrupt_info *gpe_xrupt;
@@ -509,7 +509,7 @@ acpi_ev_get_gpe_xrupt_block (
509 509
510 next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head; 510 next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
511 while (next_gpe_xrupt) { 511 while (next_gpe_xrupt) {
512 if (next_gpe_xrupt->interrupt_level == interrupt_level) { 512 if (next_gpe_xrupt->interrupt_number == interrupt_number) {
513 return_PTR (next_gpe_xrupt); 513 return_PTR (next_gpe_xrupt);
514 } 514 }
515 515
@@ -523,7 +523,7 @@ acpi_ev_get_gpe_xrupt_block (
523 return_PTR (NULL); 523 return_PTR (NULL);
524 } 524 }
525 525
526 gpe_xrupt->interrupt_level = interrupt_level; 526 gpe_xrupt->interrupt_number = interrupt_number;
527 527
528 /* Install new interrupt descriptor with spin lock */ 528 /* Install new interrupt descriptor with spin lock */
529 529
@@ -544,13 +544,13 @@ acpi_ev_get_gpe_xrupt_block (
544 544
545 /* Install new interrupt handler if not SCI_INT */ 545 /* Install new interrupt handler if not SCI_INT */
546 546
547 if (interrupt_level != acpi_gbl_FADT->sci_int) { 547 if (interrupt_number != acpi_gbl_FADT->sci_int) {
548 status = acpi_os_install_interrupt_handler (interrupt_level, 548 status = acpi_os_install_interrupt_handler (interrupt_number,
549 acpi_ev_gpe_xrupt_handler, gpe_xrupt); 549 acpi_ev_gpe_xrupt_handler, gpe_xrupt);
550 if (ACPI_FAILURE (status)) { 550 if (ACPI_FAILURE (status)) {
551 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 551 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
552 "Could not install GPE interrupt handler at level 0x%X\n", 552 "Could not install GPE interrupt handler at level 0x%X\n",
553 interrupt_level)); 553 interrupt_number));
554 return_PTR (NULL); 554 return_PTR (NULL);
555 } 555 }
556 } 556 }
@@ -584,14 +584,14 @@ acpi_ev_delete_gpe_xrupt (
584 584
585 /* We never want to remove the SCI interrupt handler */ 585 /* We never want to remove the SCI interrupt handler */
586 586
587 if (gpe_xrupt->interrupt_level == acpi_gbl_FADT->sci_int) { 587 if (gpe_xrupt->interrupt_number == acpi_gbl_FADT->sci_int) {
588 gpe_xrupt->gpe_block_list_head = NULL; 588 gpe_xrupt->gpe_block_list_head = NULL;
589 return_ACPI_STATUS (AE_OK); 589 return_ACPI_STATUS (AE_OK);
590 } 590 }
591 591
592 /* Disable this interrupt */ 592 /* Disable this interrupt */
593 593
594 status = acpi_os_remove_interrupt_handler (gpe_xrupt->interrupt_level, 594 status = acpi_os_remove_interrupt_handler (gpe_xrupt->interrupt_number,
595 acpi_ev_gpe_xrupt_handler); 595 acpi_ev_gpe_xrupt_handler);
596 if (ACPI_FAILURE (status)) { 596 if (ACPI_FAILURE (status)) {
597 return_ACPI_STATUS (status); 597 return_ACPI_STATUS (status);
@@ -621,7 +621,7 @@ acpi_ev_delete_gpe_xrupt (
621 * FUNCTION: acpi_ev_install_gpe_block 621 * FUNCTION: acpi_ev_install_gpe_block
622 * 622 *
623 * PARAMETERS: gpe_block - New GPE block 623 * PARAMETERS: gpe_block - New GPE block
624 * interrupt_level - Level to be associated with this GPE block 624 * interrupt_number - Xrupt to be associated with this GPE block
625 * 625 *
626 * RETURN: Status 626 * RETURN: Status
627 * 627 *
@@ -632,7 +632,7 @@ acpi_ev_delete_gpe_xrupt (
632static acpi_status 632static acpi_status
633acpi_ev_install_gpe_block ( 633acpi_ev_install_gpe_block (
634 struct acpi_gpe_block_info *gpe_block, 634 struct acpi_gpe_block_info *gpe_block,
635 u32 interrupt_level) 635 u32 interrupt_number)
636{ 636{
637 struct acpi_gpe_block_info *next_gpe_block; 637 struct acpi_gpe_block_info *next_gpe_block;
638 struct acpi_gpe_xrupt_info *gpe_xrupt_block; 638 struct acpi_gpe_xrupt_info *gpe_xrupt_block;
@@ -647,7 +647,7 @@ acpi_ev_install_gpe_block (
647 return_ACPI_STATUS (status); 647 return_ACPI_STATUS (status);
648 } 648 }
649 649
650 gpe_xrupt_block = acpi_ev_get_gpe_xrupt_block (interrupt_level); 650 gpe_xrupt_block = acpi_ev_get_gpe_xrupt_block (interrupt_number);
651 if (!gpe_xrupt_block) { 651 if (!gpe_xrupt_block) {
652 status = AE_NO_MEMORY; 652 status = AE_NO_MEMORY;
653 goto unlock_and_exit; 653 goto unlock_and_exit;
@@ -887,7 +887,7 @@ error_exit:
887 * gpe_block_address - Address and space_iD 887 * gpe_block_address - Address and space_iD
888 * register_count - Number of GPE register pairs in the block 888 * register_count - Number of GPE register pairs in the block
889 * gpe_block_base_number - Starting GPE number for the block 889 * gpe_block_base_number - Starting GPE number for the block
890 * interrupt_level - H/W interrupt for the block 890 * interrupt_number - H/W interrupt for the block
891 * return_gpe_block - Where the new block descriptor is returned 891 * return_gpe_block - Where the new block descriptor is returned
892 * 892 *
893 * RETURN: Status 893 * RETURN: Status
@@ -902,7 +902,7 @@ acpi_ev_create_gpe_block (
902 struct acpi_generic_address *gpe_block_address, 902 struct acpi_generic_address *gpe_block_address,
903 u32 register_count, 903 u32 register_count,
904 u8 gpe_block_base_number, 904 u8 gpe_block_base_number,
905 u32 interrupt_level, 905 u32 interrupt_number,
906 struct acpi_gpe_block_info **return_gpe_block) 906 struct acpi_gpe_block_info **return_gpe_block)
907{ 907{
908 struct acpi_gpe_block_info *gpe_block; 908 struct acpi_gpe_block_info *gpe_block;
@@ -948,7 +948,7 @@ acpi_ev_create_gpe_block (
948 948
949 /* Install the new block in the global list(s) */ 949 /* Install the new block in the global list(s) */
950 950
951 status = acpi_ev_install_gpe_block (gpe_block, interrupt_level); 951 status = acpi_ev_install_gpe_block (gpe_block, interrupt_number);
952 if (ACPI_FAILURE (status)) { 952 if (ACPI_FAILURE (status)) {
953 ACPI_MEM_FREE (gpe_block); 953 ACPI_MEM_FREE (gpe_block);
954 return_ACPI_STATUS (status); 954 return_ACPI_STATUS (status);
@@ -1013,7 +1013,7 @@ acpi_ev_create_gpe_block (
1013 ((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)), 1013 ((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)),
1014 gpe_device->name.ascii, 1014 gpe_device->name.ascii,
1015 gpe_block->register_count, 1015 gpe_block->register_count,
1016 interrupt_level)); 1016 interrupt_number));
1017 1017
1018 /* Enable all valid GPEs found above */ 1018 /* Enable all valid GPEs found above */
1019 1019
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
index 95bc09c73a6a..f2d53af97610 100644
--- a/drivers/acpi/events/evrgnini.c
+++ b/drivers/acpi/events/evrgnini.c
@@ -218,10 +218,14 @@ acpi_ev_pci_config_region_setup (
218 while (pci_root_node != acpi_gbl_root_node) { 218 while (pci_root_node != acpi_gbl_root_node) {
219 status = acpi_ut_execute_HID (pci_root_node, &object_hID); 219 status = acpi_ut_execute_HID (pci_root_node, &object_hID);
220 if (ACPI_SUCCESS (status)) { 220 if (ACPI_SUCCESS (status)) {
221 /* Got a valid _HID, check if this is a PCI root */ 221 /*
222 222 * Got a valid _HID string, check if this is a PCI root.
223 * New for ACPI 3.0: check for a PCI Express root also.
224 */
223 if (!(ACPI_STRNCMP (object_hID.value, PCI_ROOT_HID_STRING, 225 if (!(ACPI_STRNCMP (object_hID.value, PCI_ROOT_HID_STRING,
224 sizeof (PCI_ROOT_HID_STRING)))) { 226 sizeof (PCI_ROOT_HID_STRING)) ||
227 !(ACPI_STRNCMP (object_hID.value, PCI_EXPRESS_ROOT_HID_STRING,
228 sizeof (PCI_EXPRESS_ROOT_HID_STRING))))) {
225 /* Install a handler for this PCI root bridge */ 229 /* Install a handler for this PCI root bridge */
226 230
227 status = acpi_install_address_space_handler ((acpi_handle) pci_root_node, 231 status = acpi_install_address_space_handler ((acpi_handle) pci_root_node,
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index f337dc2cc569..c5f74d7b64d8 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -635,7 +635,7 @@ unlock_and_exit:
635 * PARAMETERS: gpe_device - Handle to the parent GPE Block Device 635 * PARAMETERS: gpe_device - Handle to the parent GPE Block Device
636 * gpe_block_address - Address and space_iD 636 * gpe_block_address - Address and space_iD
637 * register_count - Number of GPE register pairs in the block 637 * register_count - Number of GPE register pairs in the block
638 * interrupt_level - H/W interrupt for the block 638 * interrupt_number - H/W interrupt for the block
639 * 639 *
640 * RETURN: Status 640 * RETURN: Status
641 * 641 *
@@ -648,7 +648,7 @@ acpi_install_gpe_block (
648 acpi_handle gpe_device, 648 acpi_handle gpe_device,
649 struct acpi_generic_address *gpe_block_address, 649 struct acpi_generic_address *gpe_block_address,
650 u32 register_count, 650 u32 register_count,
651 u32 interrupt_level) 651 u32 interrupt_number)
652{ 652{
653 acpi_status status; 653 acpi_status status;
654 union acpi_operand_object *obj_desc; 654 union acpi_operand_object *obj_desc;
@@ -681,7 +681,7 @@ acpi_install_gpe_block (
681 * is always zero 681 * is always zero
682 */ 682 */
683 status = acpi_ev_create_gpe_block (node, gpe_block_address, register_count, 683 status = acpi_ev_create_gpe_block (node, gpe_block_address, register_count,
684 0, interrupt_level, &gpe_block); 684 0, interrupt_number, &gpe_block);
685 if (ACPI_FAILURE (status)) { 685 if (ACPI_FAILURE (status)) {
686 goto unlock_and_exit; 686 goto unlock_and_exit;
687 } 687 }