From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Lv Zheng <lv.zheng@intel.com>,
Bob Moore <robert.moore@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Dirk Behme <dirk.behme@gmail.com>,
"George G. Davis" <george_davis@mentor.com>
Subject: [PATCH 3.14 35/51] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers.
Date: Fri, 15 May 2015 16:10:37 -0700 [thread overview]
Message-ID: <20150515230951.737325603@linuxfoundation.org> (raw)
In-Reply-To: <20150515230950.640453239@linuxfoundation.org>
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lv Zheng <lv.zheng@intel.com>
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.
Link: https://github.com/acpica/acpica/commit/b6061237
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: George G. Davis <george_davis@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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(-)
--- a/drivers/acpi/acpica/acmacros.h
+++ b/drivers/acpi/acpica/acmacros.h
@@ -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.
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -446,7 +446,7 @@ acpi_ds_eval_region_operands(struct acpi
ACPI_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(struc
ACPI_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 */
--- a/drivers/acpi/acpica/evregion.c
+++ b/drivers/acpi/acpica/evregion.c
@@ -272,7 +272,7 @@ acpi_ev_address_space_dispatch(union acp
ACPI_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)));
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -622,8 +622,8 @@ void acpi_ex_dump_operand(union acpi_ope
acpi_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;
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -181,7 +181,7 @@ acpi_ex_system_memory_space_handler(u32
if (!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(u32
ACPI_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 func
ACPI_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 */
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -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
--- a/drivers/acpi/acpica/tbprint.c
+++ b/drivers/acpi/acpica/tbprint.c
@@ -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_physical
acpi_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,
next prev parent reply other threads:[~2015-05-15 23:10 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 23:10 [PATCH 3.14 00/51] 3.14.43-stable review Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 01/51] ocfs2: dlm: fix race between purge and get lock resource Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 02/51] nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 03/51] RDMA/CMA: Canonize IPv4 on IPV6 sockets properly Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 04/51] gpio: unregister gpiochip device before removing it Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 05/51] gpio: sysfs: fix memory leaks and device hotplug Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 06/51] mnt: Fix fs_fully_visible to verify the root directory is visible Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 07/51] mm/memory-failure: call shake_page() when error hits thp tail page Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 08/51] writeback: use |1 instead of +1 to protect against div by zero Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 09/51] mm: soft-offline: fix num_poisoned_pages counting on concurrent events Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 10/51] xen/events: Clear cpu_evtchn_mask before resuming Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 11/51] xen/console: Update console event channel on resume Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 12/51] xen/events: Set irq_info->evtchn before binding the channel to CPU in __startup_pirq() Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 13/51] Revert "dm crypt: fix deadlock when async crypto algorithm returns -EBUSY" Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 14/51] ARM: dts: imx25: Add #pwm-cells to pwm4 Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 15/51] ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 16/51] ARM: dts: imx23-olinuxino: Fix dr_mode of usb0 Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 17/51] ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 18/51] ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 19/51] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 20/51] ARM: ux500: Move GPIO regulator for SD-card into board DTSs Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 21/51] ARM: ux500: Enable GPIO regulator for SD-card for HREF boards Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 22/51] ARM: ux500: Enable GPIO regulator for SD-card for snowball Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 23/51] drm/i915: Add missing MacBook Pro models with dual channel LVDS Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 27/51] pinctrl: Dont just pretend to protect pinctrl_maps, do it for real Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 28/51] mmc: card: Dont access RPMB partitions for normal read/write Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 29/51] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 30/51] mmc: sh_mmcif: Fix timeout value for command request Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 31/51] sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 32/51] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 33/51] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 34/51] ACPICA: Utilities: Cleanup to convert physical address printing formats Greg Kroah-Hartman
2015-05-15 23:10 ` Greg Kroah-Hartman [this message]
2015-05-15 23:10 ` [PATCH 3.14 36/51] deal with deadlock in d_walk() Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 37/51] arm64: KVM: force cache clean on page fault when caches are off Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 38/51] arm64: KVM: allows discrimination of AArch32 sysreg access Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 39/51] arm64: KVM: trap VM system registers until MMU and caches are ON Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 40/51] ARM: KVM: introduce kvm_p*d_addr_end Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 41/51] arm64: KVM: flush VM pages before letting the guest enable caches Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 42/51] ARM: KVM: force cache clean on page fault when caches are off Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 43/51] ARM: KVM: fix handling of trapped 64bit coprocessor accesses Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 44/51] ARM: KVM: fix ordering of " Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 45/51] ARM: KVM: introduce per-vcpu HYP Configuration Register Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 46/51] ARM: KVM: add world-switch for AMAIR{0,1} Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 47/51] ARM: KVM: trap VM system registers until MMU and caches are ON Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 48/51] KVM: arm/arm64: vgic: fix GICD_ICFGR register accesses Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 49/51] KVM: ARM: vgic: Fix the overlap check action about setting the GICD & GICC base address Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 50/51] arm64: kvm: use inner-shareable barriers for inner-shareable maintenance Greg Kroah-Hartman
2015-05-15 23:10 ` [PATCH 3.14 51/51] kvm: arm64: vgic: fix hyp panic with 64k pages on juno platform Greg Kroah-Hartman
2015-05-16 3:15 ` [PATCH 3.14 00/51] 3.14.43-stable review Shuah Khan
2015-05-16 3:15 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150515230951.737325603@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=dirk.behme@gmail.com \
--cc=george_davis@mentor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).