diff options
-rw-r--r-- | drivers/acpi/tables/tbutils.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 2f4ab751d778..77c7e873ec37 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c | |||
@@ -131,6 +131,8 @@ acpi_tb_print_table_header(acpi_physical_address address, | |||
131 | ((struct acpi_table_rsdp *)header)->revision, | 131 | ((struct acpi_table_rsdp *)header)->revision, |
132 | ((struct acpi_table_rsdp *)header)->oem_id)); | 132 | ((struct acpi_table_rsdp *)header)->oem_id)); |
133 | } else { | 133 | } else { |
134 | /* Standard ACPI table with full common header */ | ||
135 | |||
134 | ACPI_INFO((AE_INFO, | 136 | ACPI_INFO((AE_INFO, |
135 | "%4.4s @ 0x%p/0x%04X (v%3.3d %6.6s %8.8s 0x%08X %4.4s 0x%08X)", | 137 | "%4.4s @ 0x%p/0x%04X (v%3.3d %6.6s %8.8s 0x%08X %4.4s 0x%08X)", |
136 | header->signature, ACPI_CAST_PTR(void, address), | 138 | header->signature, ACPI_CAST_PTR(void, address), |
@@ -160,7 +162,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *new_gas_struct, | |||
160 | u8 bit_width, u64 address) | 162 | u8 bit_width, u64 address) |
161 | { | 163 | { |
162 | 164 | ||
163 | ACPI_STORE_ADDRESS(new_gas_struct->address, address); | 165 | ACPI_MOVE_64_TO_64(&new_gas_struct->address, &address); |
164 | new_gas_struct->space_id = ACPI_ADR_SPACE_SYSTEM_IO; | 166 | new_gas_struct->space_id = ACPI_ADR_SPACE_SYSTEM_IO; |
165 | new_gas_struct->bit_width = bit_width; | 167 | new_gas_struct->bit_width = bit_width; |
166 | new_gas_struct->bit_offset = 0; | 168 | new_gas_struct->bit_offset = 0; |
@@ -284,13 +286,15 @@ static void acpi_tb_convert_fadt(void) | |||
284 | ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT, | 286 | ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT, |
285 | fadt_conversion_table[i].target); | 287 | fadt_conversion_table[i].target); |
286 | 288 | ||
289 | /* Expand only if the X target is null */ | ||
290 | |||
287 | if (!target->address) { | 291 | if (!target->address) { |
288 | acpi_tb_init_generic_address(target, | 292 | acpi_tb_init_generic_address(target, |
289 | *ACPI_ADD_PTR(u8, | 293 | *ACPI_ADD_PTR(u8, |
290 | &acpi_gbl_FADT, | 294 | &acpi_gbl_FADT, |
291 | fadt_conversion_table | 295 | fadt_conversion_table |
292 | [i].length), | 296 | [i].length), |
293 | *ACPI_ADD_PTR(u64, | 297 | *ACPI_ADD_PTR(u32, |
294 | &acpi_gbl_FADT, | 298 | &acpi_gbl_FADT, |
295 | fadt_conversion_table | 299 | fadt_conversion_table |
296 | [i].source)); | 300 | [i].source)); |
@@ -301,6 +305,10 @@ static void acpi_tb_convert_fadt(void) | |||
301 | * Calculate separate GAS structs for the PM1 Enable registers. | 305 | * Calculate separate GAS structs for the PM1 Enable registers. |
302 | * These addresses do not appear (directly) in the FADT, so it is | 306 | * These addresses do not appear (directly) in the FADT, so it is |
303 | * useful to calculate them once, here. | 307 | * useful to calculate them once, here. |
308 | * | ||
309 | * The PM event blocks are split into two register blocks, first is the | ||
310 | * PM Status Register block, followed immediately by the PM Enable Register | ||
311 | * block. Each is of length (pm1_event_length/2) | ||
304 | */ | 312 | */ |
305 | pm1_register_length = (u8) ACPI_DIV_2(acpi_gbl_FADT.pm1_event_length); | 313 | pm1_register_length = (u8) ACPI_DIV_2(acpi_gbl_FADT.pm1_event_length); |
306 | 314 | ||
@@ -308,17 +316,16 @@ static void acpi_tb_convert_fadt(void) | |||
308 | 316 | ||
309 | acpi_tb_init_generic_address(&acpi_gbl_xpm1a_enable, | 317 | acpi_tb_init_generic_address(&acpi_gbl_xpm1a_enable, |
310 | pm1_register_length, | 318 | pm1_register_length, |
311 | (u64) (acpi_gbl_FADT.xpm1a_event_block. | 319 | (acpi_gbl_FADT.xpm1a_event_block.address + |
312 | address + pm1_register_length)); | 320 | pm1_register_length)); |
313 | 321 | ||
314 | /* PM1B is optional; leave null if not present */ | 322 | /* PM1B is optional; leave null if not present */ |
315 | 323 | ||
316 | if (acpi_gbl_FADT.xpm1b_event_block.address) { | 324 | if (acpi_gbl_FADT.xpm1b_event_block.address) { |
317 | acpi_tb_init_generic_address(&acpi_gbl_xpm1b_enable, | 325 | acpi_tb_init_generic_address(&acpi_gbl_xpm1b_enable, |
318 | pm1_register_length, | 326 | pm1_register_length, |
319 | (u64) (acpi_gbl_FADT. | 327 | (acpi_gbl_FADT.xpm1b_event_block. |
320 | xpm1b_event_block.address + | 328 | address + pm1_register_length)); |
321 | pm1_register_length)); | ||
322 | } | 329 | } |
323 | 330 | ||
324 | /* Global FADT is the new common V2.0 FADT */ | 331 | /* Global FADT is the new common V2.0 FADT */ |