Commit 789d5040 authored by Lv Zheng's avatar Lv Zheng Committed by Jiri Slaby

ACPICA: Utilities: Cleanup to convert physical address printing formats.

commit cc2080b0 upstream.

ACPICA commit 7f06739db43a85083a70371c14141008f20b2198

For physical addresses, since the address may exceed 32-bit address range
after calculation, we should use %8.8X%8.8X (see ACPI_FORMAT_UINT64()) to
convert the %p formats.

This is a preparation to switch acpi_physical_address to 64-bit on 32-bit
kernel builds.

Link: https://github.com/acpica/acpica/commit/7f06739dSigned-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarDirk Behme <dirk.behme@gmail.com>
[gdavis: Apply changes to drivers/acpi/acpica/{tbutils,tbxfload}.c]
Signed-off-by: default avatarGeorge G. Davis <george_davis@mentor.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 99295520
...@@ -269,17 +269,15 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, ...@@ -269,17 +269,15 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
} }
ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD, ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD,
" Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n", " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n",
acpi_ut_get_region_name(rgn_desc->region. acpi_ut_get_region_name(rgn_desc->region.
space_id), space_id),
rgn_desc->region.space_id, rgn_desc->region.space_id,
obj_desc->common_field.access_byte_width, obj_desc->common_field.access_byte_width,
obj_desc->common_field.base_byte_offset, obj_desc->common_field.base_byte_offset,
field_datum_byte_offset, ACPI_CAST_PTR(void, field_datum_byte_offset,
(rgn_desc-> ACPI_FORMAT_UINT64(rgn_desc->region.address +
region. region_offset)));
address +
region_offset))));
/* Invoke the appropriate address_space/op_region handler */ /* Invoke the appropriate address_space/op_region handler */
......
...@@ -142,17 +142,17 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width) ...@@ -142,17 +142,17 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
byte_width = ACPI_DIV_8(bit_width); byte_width = ACPI_DIV_8(bit_width);
last_address = address + byte_width - 1; last_address = address + byte_width - 1;
ACPI_DEBUG_PRINT((ACPI_DB_IO, "Address %p LastAddress %p Length %X", ACPI_DEBUG_PRINT((ACPI_DB_IO,
ACPI_CAST_PTR(void, address), ACPI_CAST_PTR(void, "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X",
last_address), ACPI_FORMAT_UINT64(address),
byte_width)); ACPI_FORMAT_UINT64(last_address), byte_width));
/* Maximum 16-bit address in I/O space */ /* Maximum 16-bit address in I/O space */
if (last_address > ACPI_UINT16_MAX) { if (last_address > ACPI_UINT16_MAX) {
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Illegal I/O port address/length above 64K: %p/0x%X", "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X",
ACPI_CAST_PTR(void, address), byte_width)); ACPI_FORMAT_UINT64(address), byte_width));
return_ACPI_STATUS(AE_LIMIT); return_ACPI_STATUS(AE_LIMIT);
} }
...@@ -181,8 +181,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width) ...@@ -181,8 +181,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
if (acpi_gbl_osi_data >= port_info->osi_dependency) { if (acpi_gbl_osi_data >= port_info->osi_dependency) {
ACPI_DEBUG_PRINT((ACPI_DB_IO, ACPI_DEBUG_PRINT((ACPI_DB_IO,
"Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)", "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)",
ACPI_CAST_PTR(void, address), ACPI_FORMAT_UINT64(address),
byte_width, port_info->name, byte_width, port_info->name,
port_info->start, port_info->start,
port_info->end)); port_info->end));
......
...@@ -260,11 +260,10 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, ...@@ -260,11 +260,10 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
switch (type) { switch (type) {
case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_PROCESSOR:
acpi_os_printf("ID %02X Len %02X Addr %p\n", acpi_os_printf("ID %02X Len %02X Addr %8.8X%8.8X\n",
obj_desc->processor.proc_id, obj_desc->processor.proc_id,
obj_desc->processor.length, obj_desc->processor.length,
ACPI_CAST_PTR(void, ACPI_FORMAT_UINT64(obj_desc->processor.
obj_desc->processor.
address)); address));
break; break;
......
...@@ -285,8 +285,8 @@ acpi_tb_install_table(acpi_physical_address address, ...@@ -285,8 +285,8 @@ acpi_tb_install_table(acpi_physical_address address,
table = acpi_os_map_memory(address, sizeof(struct acpi_table_header)); table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
if (!table) { if (!table) {
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Could not map memory for table [%s] at %p", "Could not map memory for table [%s] at %8.8X%8.8X",
signature, ACPI_CAST_PTR(void, address))); signature, ACPI_FORMAT_UINT64(address)));
return; return;
} }
......
...@@ -183,10 +183,9 @@ static acpi_status acpi_tb_load_namespace(void) ...@@ -183,10 +183,9 @@ static acpi_status acpi_tb_load_namespace(void)
* be useful for debugging ACPI problems on some machines. * be useful for debugging ACPI problems on some machines.
*/ */
if (acpi_gbl_disable_ssdt_table_load) { if (acpi_gbl_disable_ssdt_table_load) {
ACPI_INFO((AE_INFO, "Ignoring %4.4s at %p", ACPI_INFO((AE_INFO, "Ignoring %4.4s at %8.8X%8.8X",
acpi_gbl_root_table_list.tables[i].signature. acpi_gbl_root_table_list.tables[i].signature.
ascii, ACPI_CAST_PTR(void, ascii, ACPI_FORMAT_UINT64(acpi_gbl_root_table_list.
acpi_gbl_root_table_list.
tables[i].address))); tables[i].address)));
continue; continue;
} }
......
...@@ -107,10 +107,10 @@ acpi_ut_add_address_range(acpi_adr_space_type space_id, ...@@ -107,10 +107,10 @@ acpi_ut_add_address_range(acpi_adr_space_type space_id,
acpi_gbl_address_range_list[space_id] = range_info; acpi_gbl_address_range_list[space_id] = range_info;
ACPI_DEBUG_PRINT((ACPI_DB_NAMES, ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
"\nAdded [%4.4s] address range: 0x%p-0x%p\n", "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
acpi_ut_get_node_name(range_info->region_node), acpi_ut_get_node_name(range_info->region_node),
ACPI_CAST_PTR(void, address), ACPI_FORMAT_UINT64(address),
ACPI_CAST_PTR(void, range_info->end_address))); ACPI_FORMAT_UINT64(range_info->end_address)));
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
...@@ -160,14 +160,12 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id, ...@@ -160,14 +160,12 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id,
} }
ACPI_DEBUG_PRINT((ACPI_DB_NAMES, ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
"\nRemoved [%4.4s] address range: 0x%p-0x%p\n", "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
acpi_ut_get_node_name(range_info-> acpi_ut_get_node_name(range_info->
region_node), region_node),
ACPI_CAST_PTR(void, ACPI_FORMAT_UINT64(range_info->
range_info->
start_address), start_address),
ACPI_CAST_PTR(void, ACPI_FORMAT_UINT64(range_info->
range_info->
end_address))); end_address)));
ACPI_FREE(range_info); ACPI_FREE(range_info);
...@@ -244,9 +242,9 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id, ...@@ -244,9 +242,9 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
region_node); region_node);
ACPI_WARNING((AE_INFO, ACPI_WARNING((AE_INFO,
"0x%p-0x%p %s conflicts with Region %s %d", "0x%8.8X%8.8X-0x%8.8X%8.8X %s conflicts with Region %s %d",
ACPI_CAST_PTR(void, address), ACPI_FORMAT_UINT64(address),
ACPI_CAST_PTR(void, end_address), ACPI_FORMAT_UINT64(end_address),
acpi_ut_get_region_name(space_id), acpi_ut_get_region_name(space_id),
pathname, overlap_count)); pathname, overlap_count));
ACPI_FREE(pathname); ACPI_FREE(pathname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment