Patch "ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers." has been added to the 3.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers.
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
acpica-utilities-cleanup-to-remove-useless-acpi_printf-format_xxx-helpers.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
1d0a0b2f6df2bf2643fadc990eb143361eca6adaMon Sep 17 00:00:00 2001
From: Lv Zheng <[email protected]>
Date: Mon, 13 Apr 2015 11:48:52 +0800
Subject: ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers.
From: Lv Zheng <[email protected]>
commit 1d0a0b2f6df2bf2643fadc990eb143361eca6ada upstream.
ACPICA commit b60612373a4ef63b64a57c124576d7ddb6d8efb6
For physical addresses, since the address may exceed 32-bit address range after calculation, we should use 0x%8.8X%8.8X instead of ACPI_PRINTF_UINT and ACPI_FORMAT_UINT64() instead of ACPI_FORMAT_NATIVE_UINT()/ACPI_FORMAT_TO_UINT().
This patch also removes above replaced macros as there are no users.
This is a preparation to switch acpi_physical_address to 64-bit on 32-bit kernel builds.
--- drivers/acpi/acpica/acmacros.h | 10 +++------- drivers/acpi/acpica/dsopcode.c | 4 ++-- drivers/acpi/acpica/evregion.c | 2 +- drivers/acpi/acpica/exdump.c | 4 ++-- drivers/acpi/acpica/exregion.c | 8 +++----- drivers/acpi/acpica/nsdump.c | 5 +++-- drivers/acpi/acpica/tbprint.c | 17 +++++++---------- 7 files changed, 21 insertions(+), 29 deletions(-)
drivers/acpi/acpica/acmacros.h +3 -7
@@ -63,19 +63,15 @@#define ACPI_SET64 (ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val))/* -* printf() format helpers +* printf() format helper. This macros is a workaround for the difficulties +* with emitting 64-bit integers and 64-bit pointers with the same code +* for both 32-bit and 64-bit hosts. */ /* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */ #define ACPI_FORMAT_UINT64 (i) ACPI_HIDWORD(i), ACPI_LODWORD(i) -#if ACPI_MACHINE_WIDTH ==64 -#define ACPI_FORMAT_NATIVE_UINT (i) ACPI_FORMAT_UINT64(i) -#else -#define ACPI_FORMAT_NATIVE_UINT (i) 0, (i) -#endif -/* * Macros for moving data around to/from buffers that are possibly unaligned. * If the hardware supports the transfer of unaligned data, just do the store.
drivers/acpi/acpica/dsopcode.c +2 -2
@@ -446,7 +446,7 @@ acpi_ds_eval_region_operands(struct acpiACPI_DEBUG_PRINT ((ACPI_DB_EXEC ,"RgnObj %p Addr %8.8X%8.8X Len %X\n" , obj_desc, -ACPI_FORMAT_NATIVE_UINT (obj_desc->region.address), +ACPI_FORMAT_UINT64 (obj_desc->region.address), obj_desc->region.length));/* Now the address and length are valid for this opregion */
@@ -544,7 +544,7 @@ acpi_ds_eval_table_region_operands(strucACPI_DEBUG_PRINT ((ACPI_DB_EXEC ,"RgnObj %p Addr %8.8X%8.8X Len %X\n" , obj_desc, -ACPI_FORMAT_NATIVE_UINT (obj_desc->region.address), +ACPI_FORMAT_UINT64 (obj_desc->region.address), obj_desc->region.length));/* Now the address and length are valid for this opregion */
drivers/acpi/acpica/evregion.c +1 -1
@@ -272,7 +272,7 @@ acpi_ev_address_space_dispatch(union acpACPI_DEBUG_PRINT ((ACPI_DB_OPREGION ,"Handler %p (@%p) Address %8.8X%8.8X [%s]\n" , ®ion_obj->region.handler->address_space, handler, -ACPI_FORMAT_NATIVE_UINT (address), +ACPI_FORMAT_UINT64 (address),acpi_ut_get_region_name (region_obj->region. space_id)));
drivers/acpi/acpica/exdump.c +2 -2
@@ -622,8 +622,8 @@ void acpi_ex_dump_operand(union acpi_opeacpi_os_printf ("\n" ); }else {acpi_os_printf (" base %8.8X%8.8X Length %X\n" , -ACPI_FORMAT_NATIVE_UINT (obj_desc->region. - address), +ACPI_FORMAT_UINT64 (obj_desc->region. + address), obj_desc->region.length); }break ;
drivers/acpi/acpica/exregion.c +3 -5
@@ -181,7 +181,7 @@ acpi_ex_system_memory_space_handler(u32if (!mem_info->mapped_logical_address) {ACPI_ERROR ((AE_INFO ,"Could not map memory at 0x%8.8X%8.8X, size %u" , -ACPI_FORMAT_NATIVE_UINT (address), +ACPI_FORMAT_UINT64 (address), (u32 ) map_length)); mem_info->mapped_length =0 ;return_ACPI_STATUS (AE_NO_MEMORY );
@@ -202,8 +202,7 @@ acpi_ex_system_memory_space_handler(u32ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n" , - bit_width, function, -ACPI_FORMAT_NATIVE_UINT (address))); + bit_width, function,ACPI_FORMAT_UINT64 (address)));/* * Perform the memory read or write
@@ -318,8 +317,7 @@ acpi_ex_system_io_space_handler(u32 funcACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"System-IO (width %u) R/W %u Address=%8.8X%8.8X\n" , - bit_width, function, -ACPI_FORMAT_NATIVE_UINT (address))); + bit_width, function,ACPI_FORMAT_UINT64 (address)));/* Decode the function parameter */
drivers/acpi/acpica/nsdump.c +3 -2
@@ -346,8 +346,9 @@ acpi_ns_dump_one_object(acpi_handle obj_ space_id));if (obj_desc->region.flags &AOPOBJ_DATA_VALID ) {acpi_os_printf (" Addr %8.8X%8.8X Len %.4X\n" , -ACPI_FORMAT_NATIVE_UINT - (obj_desc->region.address), +ACPI_FORMAT_UINT64 (obj_desc-> + region. + address), obj_desc->region.length); }else { acpi_os_printf
drivers/acpi/acpica/tbprint.c +7 -10
@@ -127,16 +127,12 @@ acpi_tb_print_table_header(acpi_physical {struct acpi_table_header local_header; -/* -* The reason that the Address is cast to a void pointer is so that we -* can use %p which will work properly on both 32-bit and 64-bit hosts. -*/ if (ACPI_COMPARE_NAME (header->signature,ACPI_SIG_FACS )) {/* FACS only has signature and length fields */ -ACPI_INFO ((AE_INFO ,"%4.4s %p %06X" , - header->signature,ACPI_CAST_PTR (void, address), +ACPI_INFO ((AE_INFO ,"%-4.4s 0x%8.8X%8.8X %06X" , + header->signature,ACPI_FORMAT_UINT64 (address), header->length)); }else if (ACPI_VALIDATE_RSDP_SIG (header->signature)) {
@@ -147,8 +143,8 @@ acpi_tb_print_table_header(acpi_physical header)->oem_id, ACPI_OEM_ID_SIZE);acpi_tb_fix_string (local_header.oem_id,ACPI_OEM_ID_SIZE ); - ACPI_INFO((AE_INFO, "RSDP %p %06X (v%.2d %6.6s)", - ACPI_CAST_PTR(void, address), + ACPI_INFO((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)", + ACPI_FORMAT_UINT64(address), (ACPI_CAST_PTR(struct acpi_table_rsdp, header)-> revision > 0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
@@ -162,8 +158,9 @@ acpi_tb_print_table_header(acpi_physicalacpi_tb_cleanup_table_header (&local_header, header); ACPI_INFO((AE_INFO, - "%4.4s %p %06X (v%.2d %6.6s %8.8s %08X %4.4s %08X)", - local_header.signature, ACPI_CAST_PTR(void, address), + "%-4.4s 0x%8.8X%8.8X" + " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)", + local_header.signature, ACPI_FORMAT_UINT64(address), local_header.length, local_header.revision, local_header.oem_id, local_header.oem_table_id, local_header.oem_revision,
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/acpica-utilities-cleanup-to-enforce-acpi_physaddr_to_ptr-acpi_ptr_to_physaddr.patch queue-3.14/acpica-utilities-cleanup-to-convert-physical-address-printing-formats.patch queue-3.14/acpica-tables-change-acpi_find_root_pointer-to-use-acpi_physical_address.patch queue-3.14/acpica-utilities-cleanup-to-remove-useless-acpi_printf-format_xxx-helpers.patch