aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evgpeblk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events/evgpeblk.c')
-rw-r--r--drivers/acpi/events/evgpeblk.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index 95ddeb48bc0f..bb0eb50cd28f 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -529,7 +529,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
529 529
530 /* Install new interrupt handler if not SCI_INT */ 530 /* Install new interrupt handler if not SCI_INT */
531 531
532 if (interrupt_number != acpi_gbl_FADT->sci_int) { 532 if (interrupt_number != acpi_gbl_FADT.sci_interrupt) {
533 status = acpi_os_install_interrupt_handler(interrupt_number, 533 status = acpi_os_install_interrupt_handler(interrupt_number,
534 acpi_ev_gpe_xrupt_handler, 534 acpi_ev_gpe_xrupt_handler,
535 gpe_xrupt); 535 gpe_xrupt);
@@ -567,7 +567,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
567 567
568 /* We never want to remove the SCI interrupt handler */ 568 /* We never want to remove the SCI interrupt handler */
569 569
570 if (gpe_xrupt->interrupt_number == acpi_gbl_FADT->sci_int) { 570 if (gpe_xrupt->interrupt_number == acpi_gbl_FADT.sci_interrupt) {
571 gpe_xrupt->gpe_block_list_head = NULL; 571 gpe_xrupt->gpe_block_list_head = NULL;
572 return_ACPI_STATUS(AE_OK); 572 return_ACPI_STATUS(AE_OK);
573 } 573 }
@@ -803,17 +803,17 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
803 (gpe_block->block_address.address 803 (gpe_block->block_address.address
804 + i + gpe_block->register_count)); 804 + i + gpe_block->register_count));
805 805
806 this_register->status_address.address_space_id = 806 this_register->status_address.space_id =
807 gpe_block->block_address.address_space_id; 807 gpe_block->block_address.space_id;
808 this_register->enable_address.address_space_id = 808 this_register->enable_address.space_id =
809 gpe_block->block_address.address_space_id; 809 gpe_block->block_address.space_id;
810 this_register->status_address.register_bit_width = 810 this_register->status_address.bit_width =
811 ACPI_GPE_REGISTER_WIDTH; 811 ACPI_GPE_REGISTER_WIDTH;
812 this_register->enable_address.register_bit_width = 812 this_register->enable_address.bit_width =
813 ACPI_GPE_REGISTER_WIDTH; 813 ACPI_GPE_REGISTER_WIDTH;
814 this_register->status_address.register_bit_offset = 814 this_register->status_address.bit_offset =
815 ACPI_GPE_REGISTER_WIDTH; 815 ACPI_GPE_REGISTER_WIDTH;
816 this_register->enable_address.register_bit_offset = 816 this_register->enable_address.bit_offset =
817 ACPI_GPE_REGISTER_WIDTH; 817 ACPI_GPE_REGISTER_WIDTH;
818 818
819 /* Init the event_info for each GPE within this register */ 819 /* Init the event_info for each GPE within this register */
@@ -1109,11 +1109,12 @@ acpi_status acpi_ev_gpe_initialize(void)
1109 * If EITHER the register length OR the block address are zero, then that 1109 * If EITHER the register length OR the block address are zero, then that
1110 * particular block is not supported. 1110 * particular block is not supported.
1111 */ 1111 */
1112 if (acpi_gbl_FADT->gpe0_blk_len && acpi_gbl_FADT->xgpe0_blk.address) { 1112 if (acpi_gbl_FADT.gpe0_block_length &&
1113 acpi_gbl_FADT.xgpe0_block.address) {
1113 1114
1114 /* GPE block 0 exists (has both length and address > 0) */ 1115 /* GPE block 0 exists (has both length and address > 0) */
1115 1116
1116 register_count0 = (u16) (acpi_gbl_FADT->gpe0_blk_len / 2); 1117 register_count0 = (u16) (acpi_gbl_FADT.gpe0_block_length / 2);
1117 1118
1118 gpe_number_max = 1119 gpe_number_max =
1119 (register_count0 * ACPI_GPE_REGISTER_WIDTH) - 1; 1120 (register_count0 * ACPI_GPE_REGISTER_WIDTH) - 1;
@@ -1121,9 +1122,9 @@ acpi_status acpi_ev_gpe_initialize(void)
1121 /* Install GPE Block 0 */ 1122 /* Install GPE Block 0 */
1122 1123
1123 status = acpi_ev_create_gpe_block(acpi_gbl_fadt_gpe_device, 1124 status = acpi_ev_create_gpe_block(acpi_gbl_fadt_gpe_device,
1124 &acpi_gbl_FADT->xgpe0_blk, 1125 &acpi_gbl_FADT.xgpe0_block,
1125 register_count0, 0, 1126 register_count0, 0,
1126 acpi_gbl_FADT->sci_int, 1127 acpi_gbl_FADT.sci_interrupt,
1127 &acpi_gbl_gpe_fadt_blocks[0]); 1128 &acpi_gbl_gpe_fadt_blocks[0]);
1128 1129
1129 if (ACPI_FAILURE(status)) { 1130 if (ACPI_FAILURE(status)) {
@@ -1132,20 +1133,21 @@ acpi_status acpi_ev_gpe_initialize(void)
1132 } 1133 }
1133 } 1134 }
1134 1135
1135 if (acpi_gbl_FADT->gpe1_blk_len && acpi_gbl_FADT->xgpe1_blk.address) { 1136 if (acpi_gbl_FADT.gpe1_block_length &&
1137 acpi_gbl_FADT.xgpe1_block.address) {
1136 1138
1137 /* GPE block 1 exists (has both length and address > 0) */ 1139 /* GPE block 1 exists (has both length and address > 0) */
1138 1140
1139 register_count1 = (u16) (acpi_gbl_FADT->gpe1_blk_len / 2); 1141 register_count1 = (u16) (acpi_gbl_FADT.gpe1_block_length / 2);
1140 1142
1141 /* Check for GPE0/GPE1 overlap (if both banks exist) */ 1143 /* Check for GPE0/GPE1 overlap (if both banks exist) */
1142 1144
1143 if ((register_count0) && 1145 if ((register_count0) &&
1144 (gpe_number_max >= acpi_gbl_FADT->gpe1_base)) { 1146 (gpe_number_max >= acpi_gbl_FADT.gpe1_base)) {
1145 ACPI_ERROR((AE_INFO, 1147 ACPI_ERROR((AE_INFO,
1146 "GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1", 1148 "GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1",
1147 gpe_number_max, acpi_gbl_FADT->gpe1_base, 1149 gpe_number_max, acpi_gbl_FADT.gpe1_base,
1148 acpi_gbl_FADT->gpe1_base + 1150 acpi_gbl_FADT.gpe1_base +
1149 ((register_count1 * 1151 ((register_count1 *
1150 ACPI_GPE_REGISTER_WIDTH) - 1))); 1152 ACPI_GPE_REGISTER_WIDTH) - 1)));
1151 1153
@@ -1157,10 +1159,11 @@ acpi_status acpi_ev_gpe_initialize(void)
1157 1159
1158 status = 1160 status =
1159 acpi_ev_create_gpe_block(acpi_gbl_fadt_gpe_device, 1161 acpi_ev_create_gpe_block(acpi_gbl_fadt_gpe_device,
1160 &acpi_gbl_FADT->xgpe1_blk, 1162 &acpi_gbl_FADT.xgpe1_block,
1161 register_count1, 1163 register_count1,
1162 acpi_gbl_FADT->gpe1_base, 1164 acpi_gbl_FADT.gpe1_base,
1163 acpi_gbl_FADT->sci_int, 1165 acpi_gbl_FADT.
1166 sci_interrupt,
1164 &acpi_gbl_gpe_fadt_blocks 1167 &acpi_gbl_gpe_fadt_blocks
1165 [1]); 1168 [1]);
1166 1169
@@ -1173,7 +1176,7 @@ acpi_status acpi_ev_gpe_initialize(void)
1173 * GPE0 and GPE1 do not have to be contiguous in the GPE number 1176 * GPE0 and GPE1 do not have to be contiguous in the GPE number
1174 * space. However, GPE0 always starts at GPE number zero. 1177 * space. However, GPE0 always starts at GPE number zero.
1175 */ 1178 */
1176 gpe_number_max = acpi_gbl_FADT->gpe1_base + 1179 gpe_number_max = acpi_gbl_FADT.gpe1_base +
1177 ((register_count1 * ACPI_GPE_REGISTER_WIDTH) - 1); 1180 ((register_count1 * ACPI_GPE_REGISTER_WIDTH) - 1);
1178 } 1181 }
1179 } 1182 }