aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evgpeblk.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-05-13 00:00:00 -0400
committerLen Brown <len.brown@intel.com>2005-07-13 16:29:07 -0400
commit6f42ccf2fc50ecee8ea170040627f268430c1648 (patch)
tree5b6690d86adfc17e7960b2e113855079fe19c541 /drivers/acpi/events/evgpeblk.c
parentd8683a0cb5d09cb7f19feefa708424a84577e68f (diff)
ACPICA from Bob Moore <robert.moore@intel.com>
Implemented support for PCI Express root bridges -- added support for device PNP0A08 in the root bridge search within AcpiEvPciConfigRegionSetup. acpi_ev_pci_config_region_setup(). The interpreter now automatically truncates incoming 64-bit constants to 32 bits if currently executing out of a 32-bit ACPI table (Revision < 2). This also affects the iASL compiler constant folding. (Note: as per below, the iASL compiler no longer allows 64-bit constants within 32-bit tables.) Fixed a problem where string and buffer objects with "static" pointers (pointers to initialization data within an ACPI table) were not handled consistently. The internal object copy operation now always copies the data to a newly allocated buffer, regardless of whether the source object is static or not. Fixed a problem with the FromBCD operator where an implicit result conversion was improperly performed while storing the result to the target operand. Since this is an "explicit conversion" operator, the implicit conversion should never be performed on the output. Fixed a problem with the CopyObject operator where a copy to an existing named object did not always completely overwrite the existing object stored at name. Specifically, a buffer-to-buffer copy did not delete the existing buffer. Replaced "interrupt_level" with "interrupt_number" in all GPE interfaces and structs for consistency. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/events/evgpeblk.c')
-rw-r--r--drivers/acpi/events/evgpeblk.c36
1 files changed, 18 insertions, 18 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