diff options
-rw-r--r-- | drivers/acpi/acpica/acmacros.h | 13 | ||||
-rw-r--r-- | drivers/acpi/acpica/dsopcode.c | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/evregion.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/exdump.c | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/exregion.c | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/nsdump.c | 5 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbdata.c | 6 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbinstal.c | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbprint.c | 19 |
9 files changed, 25 insertions, 44 deletions
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index cf607fe69dbd..c240bdf824f2 100644 --- a/drivers/acpi/acpica/acmacros.h +++ b/drivers/acpi/acpica/acmacros.h | |||
@@ -63,23 +63,12 @@ | |||
63 | #define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val)) | 63 | #define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val)) |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * printf() format helpers. These macros are workarounds for the difficulties | 66 | * printf() format helper. This macros is a workaround for the difficulties |
67 | * with emitting 64-bit integers and 64-bit pointers with the same code | 67 | * with emitting 64-bit integers and 64-bit pointers with the same code |
68 | * for both 32-bit and 64-bit hosts. | 68 | * for both 32-bit and 64-bit hosts. |
69 | */ | 69 | */ |
70 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i) | 70 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i) |
71 | 71 | ||
72 | #if ACPI_MACHINE_WIDTH == 64 | ||
73 | #define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i) | ||
74 | #define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i) | ||
75 | #define ACPI_PRINTF_UINT "0x%8.8X%8.8X" | ||
76 | |||
77 | #else | ||
78 | #define ACPI_FORMAT_NATIVE_UINT(i) 0, (u32) (i) | ||
79 | #define ACPI_FORMAT_TO_UINT(i) (u32) (i) | ||
80 | #define ACPI_PRINTF_UINT "0x%8.8X" | ||
81 | #endif | ||
82 | |||
83 | /* | 72 | /* |
84 | * Macros for moving data around to/from buffers that are possibly unaligned. | 73 | * Macros for moving data around to/from buffers that are possibly unaligned. |
85 | * If the hardware supports the transfer of unaligned data, just do the store. | 74 | * If the hardware supports the transfer of unaligned data, just do the store. |
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c index 398e2084c35c..ea0cc4e08f80 100644 --- a/drivers/acpi/acpica/dsopcode.c +++ b/drivers/acpi/acpica/dsopcode.c | |||
@@ -446,7 +446,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, | |||
446 | 446 | ||
447 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", | 447 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", |
448 | obj_desc, | 448 | obj_desc, |
449 | ACPI_FORMAT_NATIVE_UINT(obj_desc->region.address), | 449 | ACPI_FORMAT_UINT64(obj_desc->region.address), |
450 | obj_desc->region.length)); | 450 | obj_desc->region.length)); |
451 | 451 | ||
452 | /* Now the address and length are valid for this opregion */ | 452 | /* Now the address and length are valid for this opregion */ |
@@ -544,7 +544,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state, | |||
544 | 544 | ||
545 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", | 545 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", |
546 | obj_desc, | 546 | obj_desc, |
547 | ACPI_FORMAT_NATIVE_UINT(obj_desc->region.address), | 547 | ACPI_FORMAT_UINT64(obj_desc->region.address), |
548 | obj_desc->region.length)); | 548 | obj_desc->region.length)); |
549 | 549 | ||
550 | /* Now the address and length are valid for this opregion */ | 550 | /* Now the address and length are valid for this opregion */ |
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c index 9abace3401f9..2ba28a63fb68 100644 --- a/drivers/acpi/acpica/evregion.c +++ b/drivers/acpi/acpica/evregion.c | |||
@@ -272,7 +272,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | |||
272 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, | 272 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |
273 | "Handler %p (@%p) Address %8.8X%8.8X [%s]\n", | 273 | "Handler %p (@%p) Address %8.8X%8.8X [%s]\n", |
274 | ®ion_obj->region.handler->address_space, handler, | 274 | ®ion_obj->region.handler->address_space, handler, |
275 | ACPI_FORMAT_NATIVE_UINT(address), | 275 | ACPI_FORMAT_UINT64(address), |
276 | acpi_ut_get_region_name(region_obj->region. | 276 | acpi_ut_get_region_name(region_obj->region. |
277 | space_id))); | 277 | space_id))); |
278 | 278 | ||
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c index 7c213b6b6472..1da52bef632e 100644 --- a/drivers/acpi/acpica/exdump.c +++ b/drivers/acpi/acpica/exdump.c | |||
@@ -767,8 +767,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
767 | acpi_os_printf("\n"); | 767 | acpi_os_printf("\n"); |
768 | } else { | 768 | } else { |
769 | acpi_os_printf(" base %8.8X%8.8X Length %X\n", | 769 | acpi_os_printf(" base %8.8X%8.8X Length %X\n", |
770 | ACPI_FORMAT_NATIVE_UINT(obj_desc->region. | 770 | ACPI_FORMAT_UINT64(obj_desc->region. |
771 | address), | 771 | address), |
772 | obj_desc->region.length); | 772 | obj_desc->region.length); |
773 | } | 773 | } |
774 | break; | 774 | break; |
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c index 2b8cae62529a..389a4121b282 100644 --- a/drivers/acpi/acpica/exregion.c +++ b/drivers/acpi/acpica/exregion.c | |||
@@ -182,7 +182,7 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
182 | if (!mem_info->mapped_logical_address) { | 182 | if (!mem_info->mapped_logical_address) { |
183 | ACPI_ERROR((AE_INFO, | 183 | ACPI_ERROR((AE_INFO, |
184 | "Could not map memory at 0x%8.8X%8.8X, size %u", | 184 | "Could not map memory at 0x%8.8X%8.8X, size %u", |
185 | ACPI_FORMAT_NATIVE_UINT(address), | 185 | ACPI_FORMAT_UINT64(address), |
186 | (u32)map_length)); | 186 | (u32)map_length)); |
187 | mem_info->mapped_length = 0; | 187 | mem_info->mapped_length = 0; |
188 | return_ACPI_STATUS(AE_NO_MEMORY); | 188 | return_ACPI_STATUS(AE_NO_MEMORY); |
@@ -203,8 +203,7 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
203 | 203 | ||
204 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 204 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
205 | "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n", | 205 | "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n", |
206 | bit_width, function, | 206 | bit_width, function, ACPI_FORMAT_UINT64(address))); |
207 | ACPI_FORMAT_NATIVE_UINT(address))); | ||
208 | 207 | ||
209 | /* | 208 | /* |
210 | * Perform the memory read or write | 209 | * Perform the memory read or write |
@@ -319,8 +318,7 @@ acpi_ex_system_io_space_handler(u32 function, | |||
319 | 318 | ||
320 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 319 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
321 | "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n", | 320 | "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n", |
322 | bit_width, function, | 321 | bit_width, function, ACPI_FORMAT_UINT64(address))); |
323 | ACPI_FORMAT_NATIVE_UINT(address))); | ||
324 | 322 | ||
325 | /* Decode the function parameter */ | 323 | /* Decode the function parameter */ |
326 | 324 | ||
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c index e76d8fda24a5..d259393505fa 100644 --- a/drivers/acpi/acpica/nsdump.c +++ b/drivers/acpi/acpica/nsdump.c | |||
@@ -346,8 +346,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
346 | space_id)); | 346 | space_id)); |
347 | if (obj_desc->region.flags & AOPOBJ_DATA_VALID) { | 347 | if (obj_desc->region.flags & AOPOBJ_DATA_VALID) { |
348 | acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n", | 348 | acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n", |
349 | ACPI_FORMAT_NATIVE_UINT | 349 | ACPI_FORMAT_UINT64(obj_desc-> |
350 | (obj_desc->region.address), | 350 | region. |
351 | address), | ||
351 | obj_desc->region.length); | 352 | obj_desc->region.length); |
352 | } else { | 353 | } else { |
353 | acpi_os_printf | 354 | acpi_os_printf |
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c index 03834496d55b..fd5998b2b46b 100644 --- a/drivers/acpi/acpica/tbdata.c +++ b/drivers/acpi/acpica/tbdata.c | |||
@@ -399,14 +399,14 @@ acpi_tb_verify_temp_table(struct acpi_table_desc * table_desc, char *signature) | |||
399 | table_desc->length); | 399 | table_desc->length); |
400 | if (ACPI_FAILURE(status)) { | 400 | if (ACPI_FAILURE(status)) { |
401 | ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY, | 401 | ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY, |
402 | "%4.4s " ACPI_PRINTF_UINT | 402 | "%4.4s 0x%8.8X%8.8X" |
403 | " Attempted table install failed", | 403 | " Attempted table install failed", |
404 | acpi_ut_valid_acpi_name(table_desc-> | 404 | acpi_ut_valid_acpi_name(table_desc-> |
405 | signature. | 405 | signature. |
406 | ascii) ? | 406 | ascii) ? |
407 | table_desc->signature.ascii : "????", | 407 | table_desc->signature.ascii : "????", |
408 | ACPI_FORMAT_TO_UINT(table_desc-> | 408 | ACPI_FORMAT_UINT64(table_desc-> |
409 | address))); | 409 | address))); |
410 | goto invalidate_and_exit; | 410 | goto invalidate_and_exit; |
411 | } | 411 | } |
412 | } | 412 | } |
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c index 65da4c0f13e6..0d184c4344e6 100644 --- a/drivers/acpi/acpica/tbinstal.c +++ b/drivers/acpi/acpica/tbinstal.c | |||
@@ -432,11 +432,11 @@ finish_override: | |||
432 | return; | 432 | return; |
433 | } | 433 | } |
434 | 434 | ||
435 | ACPI_INFO((AE_INFO, "%4.4s " ACPI_PRINTF_UINT | 435 | ACPI_INFO((AE_INFO, "%4.4s 0x%8.8X%8.8X" |
436 | " %s table override, new table: " ACPI_PRINTF_UINT, | 436 | " %s table override, new table: 0x%8.8X%8.8X", |
437 | old_table_desc->signature.ascii, | 437 | old_table_desc->signature.ascii, |
438 | ACPI_FORMAT_TO_UINT(old_table_desc->address), | 438 | ACPI_FORMAT_UINT64(old_table_desc->address), |
439 | override_type, ACPI_FORMAT_TO_UINT(new_table_desc.address))); | 439 | override_type, ACPI_FORMAT_UINT64(new_table_desc.address))); |
440 | 440 | ||
441 | /* We can now uninstall the original table */ | 441 | /* We can now uninstall the original table */ |
442 | 442 | ||
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c index ef16c06e5091..77ba5c71c6e7 100644 --- a/drivers/acpi/acpica/tbprint.c +++ b/drivers/acpi/acpica/tbprint.c | |||
@@ -127,18 +127,12 @@ acpi_tb_print_table_header(acpi_physical_address address, | |||
127 | { | 127 | { |
128 | struct acpi_table_header local_header; | 128 | struct acpi_table_header local_header; |
129 | 129 | ||
130 | /* | ||
131 | * The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to | ||
132 | * support both 32-bit and 64-bit hosts/addresses in a consistent manner. | ||
133 | * The %p specifier does not emit uniform output on all hosts. On some, | ||
134 | * leading zeros are not supported. | ||
135 | */ | ||
136 | if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) { | 130 | if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) { |
137 | 131 | ||
138 | /* FACS only has signature and length fields */ | 132 | /* FACS only has signature and length fields */ |
139 | 133 | ||
140 | ACPI_INFO((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X", | 134 | ACPI_INFO((AE_INFO, "%-4.4s 0x%8.8X%8.8X %06X", |
141 | header->signature, ACPI_FORMAT_TO_UINT(address), | 135 | header->signature, ACPI_FORMAT_UINT64(address), |
142 | header->length)); | 136 | header->length)); |
143 | } else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) { | 137 | } else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) { |
144 | 138 | ||
@@ -149,9 +143,8 @@ acpi_tb_print_table_header(acpi_physical_address address, | |||
149 | header)->oem_id, ACPI_OEM_ID_SIZE); | 143 | header)->oem_id, ACPI_OEM_ID_SIZE); |
150 | acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE); | 144 | acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE); |
151 | 145 | ||
152 | ACPI_INFO((AE_INFO, | 146 | ACPI_INFO((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)", |
153 | "RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)", | 147 | ACPI_FORMAT_UINT64(address), |
154 | ACPI_FORMAT_TO_UINT(address), | ||
155 | (ACPI_CAST_PTR(struct acpi_table_rsdp, header)-> | 148 | (ACPI_CAST_PTR(struct acpi_table_rsdp, header)-> |
156 | revision > | 149 | revision > |
157 | 0) ? ACPI_CAST_PTR(struct acpi_table_rsdp, | 150 | 0) ? ACPI_CAST_PTR(struct acpi_table_rsdp, |
@@ -165,9 +158,9 @@ acpi_tb_print_table_header(acpi_physical_address address, | |||
165 | acpi_tb_cleanup_table_header(&local_header, header); | 158 | acpi_tb_cleanup_table_header(&local_header, header); |
166 | 159 | ||
167 | ACPI_INFO((AE_INFO, | 160 | ACPI_INFO((AE_INFO, |
168 | "%-4.4s " ACPI_PRINTF_UINT | 161 | "%-4.4s 0x%8.8X%8.8X" |
169 | " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)", | 162 | " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)", |
170 | local_header.signature, ACPI_FORMAT_TO_UINT(address), | 163 | local_header.signature, ACPI_FORMAT_UINT64(address), |
171 | local_header.length, local_header.revision, | 164 | local_header.length, local_header.revision, |
172 | local_header.oem_id, local_header.oem_table_id, | 165 | local_header.oem_id, local_header.oem_table_id, |
173 | local_header.oem_revision, | 166 | local_header.oem_revision, |