All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings
@ 2015-05-12 21:28 George G. Davis
  2015-05-12 21:28 ` [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address George G. Davis
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: George G. Davis @ 2015-05-12 21:28 UTC (permalink / raw)
  To: stable; +Cc: Dirk Behme, George G. Davis

From: "George G. Davis" <george_davis@mentor.com>

Hello,

The following changes introduced in the recent v3.14.41 update have introduced
build warnings for the ARCH=i386 case:

a26f0f3 ACPICA: Utilities: split IO address types from data type models.
8c56b5e ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()


As of v3.14.41, the following new build warnings exist for the `make ARCH=i386
i386_defconfig bzImage` case:

  CC      drivers/acpi/osl.o
drivers/acpi/osl.c: In function ‘acpi_os_get_root_pointer’:
drivers/acpi/osl.c:264:3: warning: passing argument 1 of ‘acpi_find_root_pointer’ from incompatible pointer type [enabled by default]
   acpi_find_root_pointer(&pa);
   ^
In file included from include/acpi/acpi.h:64:0,
                 from include/linux/acpi.h:42,
                 from drivers/acpi/osl.c:41:
include/acpi/acpixf.h:178:123: note: expected ‘acpi_size *’ but argument is of type ‘acpi_physical_address *’
 acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
                                                                                                                           ^
  CC      drivers/acpi/acpica/exregion.o
drivers/acpi/acpica/exregion.c: In function ‘acpi_ex_system_memory_space_handler’:
drivers/acpi/acpica/exregion.c:182:4: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 5 has type ‘acpi_physical_address’ [-Wformat=]
    ACPI_ERROR((AE_INFO,
    ^
  CC      drivers/acpi/acpica/hwvalid.o
drivers/acpi/acpica/hwvalid.c: In function ‘acpi_hw_validate_io_request’:
drivers/acpi/acpica/hwvalid.c:153:103: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   ACPI_ERROR((AE_INFO,
                                                                                                       ^
  CC      drivers/acpi/acpica/tbinstal.o
drivers/acpi/acpica/tbinstal.c: In function ‘acpi_tb_table_override’:
drivers/acpi/acpica/tbinstal.c:294:167: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
                                                                                                                                                                       ^
drivers/acpi/acpica/tbinstal.c:311:117: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  ACPI_INFO((AE_INFO,
                                                                                                                     ^
  CC      drivers/acpi/acpica/tbprint.o
drivers/acpi/acpica/tbprint.c: In function ‘acpi_tb_print_table_header’:
drivers/acpi/acpica/tbprint.c:138:84: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   ACPI_INFO((AE_INFO, "%4.4s %p %06X",
                                                                                    ^
drivers/acpi/acpica/tbprint.c:150:78: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   ACPI_INFO((AE_INFO, "RSDP %p %06X (v%.2d %6.6s)",
                                                                              ^
drivers/acpi/acpica/tbprint.c:164:125: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   ACPI_INFO((AE_INFO,
                                                                                                                             ^
  CC      drivers/acpi/acpica/tbutils.o
drivers/acpi/acpica/tbutils.c: In function ‘acpi_tb_install_table’:
drivers/acpi/acpica/tbutils.c:229:105: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   ACPI_ERROR((AE_INFO,
                                                                                                         ^
  CC      drivers/acpi/acpica/tbxfload.o
drivers/acpi/acpica/tbxfload.c: In function ‘acpi_tb_load_namespace’:
drivers/acpi/acpica/tbxfload.c:187:126: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    ACPI_INFO((AE_INFO, "Ignoring %4.4s at %p",
                                                                                                                              ^
  CC      drivers/acpi/acpica/utaddress.o
drivers/acpi/acpica/utaddress.c: In function ‘acpi_ut_check_address_range’:
drivers/acpi/acpica/utaddress.c:247:149: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     ACPI_WARNING((AE_INFO,
                                                                                                                                                     ^
drivers/acpi/acpica/utaddress.c:247:180: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     ACPI_WARNING((AE_INFO,
                                                                                                                                                                                    ^
drivers/acpi/acpica/utaddress.c:247:215: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     ACPI_WARNING((AE_INFO,
                                                                                                                                                                                                                       ^
drivers/acpi/acpica/utaddress.c:247:265: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     ACPI_WARNING((AE_INFO,
                                                                                                                                                                                                                                                                         ^

The following upstream commits have been backported to v3.14.41 in order to
resolve the above build warnings:

Lv Zheng (4):
  ACPICA: Tables: Change acpi_find_root_pointer() to use
    acpi_physical_address.
  ACPICA: Utilities: Cleanup to enforce
    ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR().
  ACPICA: Utilities: Cleanup to convert physical address printing
    formats.
  ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx
    helpers.

 drivers/acpi/acpica/acmacros.h  | 10 +++-------
 drivers/acpi/acpica/dsopcode.c  |  7 +++----
 drivers/acpi/acpica/evregion.c  |  2 +-
 drivers/acpi/acpica/exdump.c    |  4 ++--
 drivers/acpi/acpica/exfldio.c   | 10 ++++------
 drivers/acpi/acpica/exregion.c  |  8 +++-----
 drivers/acpi/acpica/hwvalid.c   | 16 ++++++++--------
 drivers/acpi/acpica/nsdump.c    | 12 ++++++------
 drivers/acpi/acpica/tbinstal.c  |  5 ++---
 drivers/acpi/acpica/tbprint.c   | 17 +++++++----------
 drivers/acpi/acpica/tbutils.c   |  4 ++--
 drivers/acpi/acpica/tbxfload.c  |  7 +++----
 drivers/acpi/acpica/tbxfroot.c  |  7 ++++---
 drivers/acpi/acpica/utaddress.c | 34 +++++++++++++++-------------------
 include/acpi/acpixf.h           |  2 +-
 15 files changed, 64 insertions(+), 81 deletions(-)

Please review and apply.

Thanks in advance!

--
Regards,
George

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address.
  2015-05-12 21:28 [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings George G. Davis
@ 2015-05-12 21:28 ` George G. Davis
  2015-05-15  1:43   ` Greg KH
  2015-05-12 21:28 ` [PATCH 2/4] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() George G. Davis
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: George G. Davis @ 2015-05-12 21:28 UTC (permalink / raw)
  To: stable
  Cc: Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki, George G. Davis

From: Lv Zheng <lv.zheng@intel.com>

commit f254e3c57b9d952e987502aefa0804c177dd2503 upstream.

ACPICA commit 7d9fd64397d7c38899d3dc497525f6e6b044e0e3

OSPMs like Linux expect an acpi_physical_address returning value from
acpi_find_root_pointer(). This triggers warnings if sizeof (acpi_size) doesn't
equal to sizeof (acpi_physical_address):
  drivers/acpi/osl.c:275:3: warning: passing argument 1 of 'acpi_find_root_pointer' from incompatible pointer type [enabled by default]
  In file included from include/acpi/acpi.h:64:0,
                   from include/linux/acpi.h:36,
                   from drivers/acpi/osl.c:41:
  include/acpi/acpixf.h:433:1: note: expected 'acpi_size *' but argument is of type 'acpi_physical_address *'
This patch corrects acpi_find_root_pointer().

Link: https://github.com/acpica/acpica/commit/7d9fd643
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>
---
 drivers/acpi/acpica/tbxfroot.c | 7 ++++---
 include/acpi/acpixf.h          | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index e4e1468..01bf7eb 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -111,7 +111,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
  *
  ******************************************************************************/
 
-acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
+acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address)
 {
 	u8 *table_ptr;
 	u8 *mem_rover;
@@ -169,7 +169,8 @@ acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
 			physical_address +=
 			    (u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
 
-			*table_address = physical_address;
+			*table_address =
+			    (acpi_physical_address) physical_address;
 			return_ACPI_STATUS(AE_OK);
 		}
 	}
@@ -202,7 +203,7 @@ acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
 		    (ACPI_HI_RSDP_WINDOW_BASE +
 		     ACPI_PTR_DIFF(mem_rover, table_ptr));
 
-		*table_address = physical_address;
+		*table_address = (acpi_physical_address) physical_address;
 		return_ACPI_STATUS(AE_OK);
 	}
 
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index fea6773..5d51f27 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -175,7 +175,7 @@ acpi_status __init acpi_load_tables(void);
  */
 acpi_status __init acpi_reallocate_root_table(void);
 
-acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
+acpi_status __init acpi_find_root_pointer(acpi_physical_address * rsdp_address);
 
 acpi_status acpi_unload_table_id(acpi_owner_id id);
 
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/4] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR().
  2015-05-12 21:28 [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings George G. Davis
  2015-05-12 21:28 ` [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address George G. Davis
@ 2015-05-12 21:28 ` George G. Davis
  2015-05-12 21:28 ` [PATCH 3/4] ACPICA: Utilities: Cleanup to convert physical address printing formats George G. Davis
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: George G. Davis @ 2015-05-12 21:28 UTC (permalink / raw)
  To: stable
  Cc: Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki, George G. Davis

From: Lv Zheng <lv.zheng@intel.com>

commit 6d3fd3cc33d50e4c0d0c0bd172de02caaec3127c upstream.

ACPICA commit 154f6d074dd38d6ebc0467ad454454e6c5c9ecdf

There are code pieces converting pointers using "(acpi_physical_address) x"
or "ACPI_CAST_PTR (t, x)" formats, this patch cleans up them.

Known issues:
1. Cleanup of "(ACPI_PHYSICAL_ADDRRESS) x" for a table field
   For the conversions around the table fields, it is better to fix it with
   alignment also fixed. So this patch doesn't modify such code. There
   should be no functional problem by leaving them unchanged.

Link: https://github.com/acpica/acpica/commit/154f6d07
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>
---
 drivers/acpi/acpica/dsopcode.c | 3 +--
 drivers/acpi/acpica/tbinstal.c | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index 5205edc..cbf36b0 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -539,8 +539,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
 		return_ACPI_STATUS(AE_NOT_EXIST);
 	}
 
-	obj_desc->region.address =
-	    (acpi_physical_address) ACPI_TO_INTEGER(table);
+	obj_desc->region.address = ACPI_PTR_TO_PHYSADDR(table);
 	obj_desc->region.length = table->length;
 
 	ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 634357d..c4d0977 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -294,8 +294,7 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
 			ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
 					"%4.4s %p Attempted physical table override failed",
 					table_header->signature,
-					ACPI_CAST_PTR(void,
-						      table_desc->address)));
+					ACPI_PHYSADDR_TO_PTR(table_desc->address)));
 			return (NULL);
 		}
 
@@ -311,7 +310,7 @@ finish_override:
 	ACPI_INFO((AE_INFO,
 		   "%4.4s %p %s table override, new table: %p",
 		   table_header->signature,
-		   ACPI_CAST_PTR(void, table_desc->address),
+		   ACPI_PHYSADDR_TO_PTR(table_desc->address),
 		   override_type, new_table));
 
 	/* We can now unmap/delete the original table (if fully mapped) */
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/4] ACPICA: Utilities: Cleanup to convert physical address printing formats.
  2015-05-12 21:28 [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings George G. Davis
  2015-05-12 21:28 ` [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address George G. Davis
  2015-05-12 21:28 ` [PATCH 2/4] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() George G. Davis
@ 2015-05-12 21:28 ` George G. Davis
  2015-05-15 20:41   ` Greg KH
  2015-05-12 21:28 ` [PATCH 4/4] " George G. Davis
  2015-05-19 10:57 ` [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings Luis Henriques
  4 siblings, 1 reply; 12+ messages in thread
From: George G. Davis @ 2015-05-12 21:28 UTC (permalink / raw)
  To: stable
  Cc: Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki, George G. Davis

From: Lv Zheng <lv.zheng@intel.com>

commit cc2080b0e5a7c6c33ef5e9ffccbc2b8f6f861393 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/7f06739d
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>
[gdavis: Apply changes to drivers/acpi/acpica/{tbutils,tbxfload}.c]
Signed-off-by: George G. Davis <george_davis@mentor.com>
---
 drivers/acpi/acpica/exfldio.c   | 10 ++++------
 drivers/acpi/acpica/hwvalid.c   | 16 ++++++++--------
 drivers/acpi/acpica/nsdump.c    |  7 +++----
 drivers/acpi/acpica/tbutils.c   |  4 ++--
 drivers/acpi/acpica/tbxfload.c  |  7 +++----
 drivers/acpi/acpica/utaddress.c | 34 +++++++++++++++-------------------
 6 files changed, 35 insertions(+), 43 deletions(-)

diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index 49fb742..98af39f 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -263,17 +263,15 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
 	}
 
 	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.
 						      space_id),
 			      rgn_desc->region.space_id,
 			      obj_desc->common_field.access_byte_width,
 			      obj_desc->common_field.base_byte_offset,
-			      field_datum_byte_offset, ACPI_CAST_PTR(void,
-								     (rgn_desc->
-								      region.
-								      address +
-								      region_offset))));
+			      field_datum_byte_offset,
+			      ACPI_FORMAT_UINT64(rgn_desc->region.address +
+						 region_offset)));
 
 	/* Invoke the appropriate address_space/op_region handler */
 
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c
index eab70d5..fae5758 100644
--- a/drivers/acpi/acpica/hwvalid.c
+++ b/drivers/acpi/acpica/hwvalid.c
@@ -142,17 +142,17 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
 	byte_width = ACPI_DIV_8(bit_width);
 	last_address = address + byte_width - 1;
 
-	ACPI_DEBUG_PRINT((ACPI_DB_IO, "Address %p LastAddress %p Length %X",
-			  ACPI_CAST_PTR(void, address), ACPI_CAST_PTR(void,
-								      last_address),
-			  byte_width));
+	ACPI_DEBUG_PRINT((ACPI_DB_IO,
+			  "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X",
+			  ACPI_FORMAT_UINT64(address),
+			  ACPI_FORMAT_UINT64(last_address), byte_width));
 
 	/* Maximum 16-bit address in I/O space */
 
 	if (last_address > ACPI_UINT16_MAX) {
 		ACPI_ERROR((AE_INFO,
-			    "Illegal I/O port address/length above 64K: %p/0x%X",
-			    ACPI_CAST_PTR(void, address), byte_width));
+			    "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X",
+			    ACPI_FORMAT_UINT64(address), byte_width));
 		return_ACPI_STATUS(AE_LIMIT);
 	}
 
@@ -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) {
 				ACPI_DEBUG_PRINT((ACPI_DB_IO,
-						  "Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)",
-						  ACPI_CAST_PTR(void, address),
+						  "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)",
+						  ACPI_FORMAT_UINT64(address),
 						  byte_width, port_info->name,
 						  port_info->start,
 						  port_info->end));
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 48b9c6f..a5deaa9 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -271,12 +271,11 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 		switch (type) {
 		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.length,
-				       ACPI_CAST_PTR(void,
-						     obj_desc->processor.
-						     address));
+				       ACPI_FORMAT_UINT64(obj_desc->processor.
+							  address));
 			break;
 
 		case ACPI_TYPE_DEVICE:
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 1bc879e..4cca6b7 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -227,8 +227,8 @@ acpi_tb_install_table(acpi_physical_address address,
 	table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
 	if (!table) {
 		ACPI_ERROR((AE_INFO,
-			    "Could not map memory for table [%s] at %p",
-			    signature, ACPI_CAST_PTR(void, address)));
+			    "Could not map memory for table [%s] at %8.8X%8.8X",
+			    signature, ACPI_FORMAT_UINT64(address)));
 		return;
 	}
 
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 60b5a87..daad59d 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -184,11 +184,10 @@ static acpi_status acpi_tb_load_namespace(void)
 		 * be useful for debugging ACPI problems on some machines.
 		 */
 		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.
-				   ascii, ACPI_CAST_PTR(void,
-							acpi_gbl_root_table_list.
-							tables[i].address)));
+				   ascii, ACPI_FORMAT_UINT64(acpi_gbl_root_table_list.
+							     tables[i].address)));
 			continue;
 		}
 
diff --git a/drivers/acpi/acpica/utaddress.c b/drivers/acpi/acpica/utaddress.c
index 2c2b6ae..3a02b65 100644
--- a/drivers/acpi/acpica/utaddress.c
+++ b/drivers/acpi/acpica/utaddress.c
@@ -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_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_CAST_PTR(void, address),
-			  ACPI_CAST_PTR(void, range_info->end_address)));
+			  ACPI_FORMAT_UINT64(address),
+			  ACPI_FORMAT_UINT64(range_info->end_address)));
 
 	(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
 	return_ACPI_STATUS(AE_OK);
@@ -160,15 +160,13 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id,
 			}
 
 			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->
 								region_node),
-					  ACPI_CAST_PTR(void,
-							range_info->
-							start_address),
-					  ACPI_CAST_PTR(void,
-							range_info->
-							end_address)));
+					  ACPI_FORMAT_UINT64(range_info->
+							     start_address),
+					  ACPI_FORMAT_UINT64(range_info->
+							     end_address)));
 
 			ACPI_FREE(range_info);
 			return_VOID;
@@ -245,16 +243,14 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
 								  region_node);
 
 				ACPI_WARNING((AE_INFO,
-					      "%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)",
+					      "%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)",
 					      acpi_ut_get_region_name(space_id),
-					      ACPI_CAST_PTR(void, address),
-					      ACPI_CAST_PTR(void, end_address),
-					      ACPI_CAST_PTR(void,
-							    range_info->
-							    start_address),
-					      ACPI_CAST_PTR(void,
-							    range_info->
-							    end_address),
+					      ACPI_FORMAT_UINT64(address),
+					      ACPI_FORMAT_UINT64(end_address),
+					      ACPI_FORMAT_UINT64(range_info->
+								 start_address),
+					      ACPI_FORMAT_UINT64(range_info->
+								 end_address),
 					      pathname));
 				ACPI_FREE(pathname);
 			}
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/4] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers.
  2015-05-12 21:28 [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings George G. Davis
                   ` (2 preceding siblings ...)
  2015-05-12 21:28 ` [PATCH 3/4] ACPICA: Utilities: Cleanup to convert physical address printing formats George G. Davis
@ 2015-05-12 21:28 ` George G. Davis
  2015-05-15 20:46   ` Greg KH
  2015-05-19 10:57 ` [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings Luis Henriques
  4 siblings, 1 reply; 12+ messages in thread
From: George G. Davis @ 2015-05-12 21:28 UTC (permalink / raw)
  To: stable
  Cc: Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki, George G. Davis

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>
---
 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(-)

diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h
index 2a86c65..97c7a52 100644
--- 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.
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index cbf36b0..fe79296 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,
 
 	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(struct acpi_walk_state *walk_state,
 
 	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 */
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
index cd4b231..ee8ec4b 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,
 	ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
 			  "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
 			  &region_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)));
 
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
index 4d046fa..b64fb68 100644
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -622,8 +622,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
 			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;
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 9d28867e..cf40223 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -181,7 +181,7 @@ acpi_ex_system_memory_space_handler(u32 function,
 		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 function,
 
 	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 function,
 
 	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 */
 
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index a5deaa9..fc82c53 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,
 							       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
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
index 6866e76..2957ed5 100644
--- a/drivers/acpi/acpica/tbprint.c
+++ b/drivers/acpi/acpica/tbprint.c
@@ -127,16 +127,12 @@ acpi_tb_print_table_header(acpi_physical_address address,
 {
 	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_address address,
 					  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_address address,
 		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,
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address.
  2015-05-12 21:28 ` [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address George G. Davis
@ 2015-05-15  1:43   ` Greg KH
  2015-05-15 15:01     ` George G. Davis
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2015-05-15  1:43 UTC (permalink / raw)
  To: George G. Davis
  Cc: stable, Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki,
	George G. Davis

On Tue, May 12, 2015 at 05:28:19PM -0400, George G. Davis wrote:
> From: Lv Zheng <lv.zheng@intel.com>
> 
> commit f254e3c57b9d952e987502aefa0804c177dd2503 upstream.
> 
> ACPICA commit 7d9fd64397d7c38899d3dc497525f6e6b044e0e3
> 
> OSPMs like Linux expect an acpi_physical_address returning value from
> acpi_find_root_pointer(). This triggers warnings if sizeof (acpi_size) doesn't
> equal to sizeof (acpi_physical_address):
>   drivers/acpi/osl.c:275:3: warning: passing argument 1 of 'acpi_find_root_pointer' from incompatible pointer type [enabled by default]
>   In file included from include/acpi/acpi.h:64:0,
>                    from include/linux/acpi.h:36,
>                    from drivers/acpi/osl.c:41:
>   include/acpi/acpixf.h:433:1: note: expected 'acpi_size *' but argument is of type 'acpi_physical_address *'
> This patch corrects acpi_find_root_pointer().
> 
> Link: https://github.com/acpica/acpica/commit/7d9fd643
> 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>
> ---
>  drivers/acpi/acpica/tbxfroot.c | 7 ++++---
>  include/acpi/acpixf.h          | 2 +-
>  2 files changed, 5 insertions(+), 4 deletions(-)

Why shouldn't this patch also be in 4.0-stable?  I don't want to take
patches in one tree and not others.

Same for the other patches in this series.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address.
  2015-05-15  1:43   ` Greg KH
@ 2015-05-15 15:01     ` George G. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: George G. Davis @ 2015-05-15 15:01 UTC (permalink / raw)
  To: Greg KH
  Cc: stable, Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki,
	George G. Davis

Hello Greg,

On Thu, May 14, 2015 at 06:43:40PM -0700, Greg KH wrote:
> On Tue, May 12, 2015 at 05:28:19PM -0400, George G. Davis wrote:
> > From: Lv Zheng <lv.zheng@intel.com>
> > 
> > commit f254e3c57b9d952e987502aefa0804c177dd2503 upstream.
> > 
> > ACPICA commit 7d9fd64397d7c38899d3dc497525f6e6b044e0e3
> > 
> > OSPMs like Linux expect an acpi_physical_address returning value from
> > acpi_find_root_pointer(). This triggers warnings if sizeof (acpi_size) doesn't
> > equal to sizeof (acpi_physical_address):
> >   drivers/acpi/osl.c:275:3: warning: passing argument 1 of 'acpi_find_root_pointer' from incompatible pointer type [enabled by default]
> >   In file included from include/acpi/acpi.h:64:0,
> >                    from include/linux/acpi.h:36,
> >                    from drivers/acpi/osl.c:41:
> >   include/acpi/acpixf.h:433:1: note: expected 'acpi_size *' but argument is of type 'acpi_physical_address *'
> > This patch corrects acpi_find_root_pointer().
> > 
> > Link: https://github.com/acpica/acpica/commit/7d9fd643
> > 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>
> > ---
> >  drivers/acpi/acpica/tbxfroot.c | 7 ++++---
> >  include/acpi/acpixf.h          | 2 +-
> >  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> Why shouldn't this patch also be in 4.0-stable?

Apologies, I did not intend to imply that these commits should only be
applied to v3.14 stable.  It just happens to be the version we're
using.

> I don't want to take
> patches in one tree and not others.
> 
> Same for the other patches in this series.

It looks as if the upstream commit which causes this issue, "2b87601
ACPICA: Utilities: split IO address types from data type models.", has
been applied to v3.10, v3.14, v3.19, and v4.0 stable branches.  So all
of the commits in this series will be required for each of those stable
release branches, to resolve the ARCH=i386 ACPI build warnings which
should exist in each of those stable branches.

Thanks!

--
Regards,
George

> 
> thanks,
> 
> greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] ACPICA: Utilities: Cleanup to convert physical address printing formats.
  2015-05-12 21:28 ` [PATCH 3/4] ACPICA: Utilities: Cleanup to convert physical address printing formats George G. Davis
@ 2015-05-15 20:41   ` Greg KH
  2015-05-18 19:39     ` [PATCH 3.10 v2 1/2] " George G. Davis
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2015-05-15 20:41 UTC (permalink / raw)
  To: George G. Davis
  Cc: stable, Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki,
	George G. Davis

On Tue, May 12, 2015 at 05:28:21PM -0400, George G. Davis wrote:
> From: Lv Zheng <lv.zheng@intel.com>
> 
> commit cc2080b0e5a7c6c33ef5e9ffccbc2b8f6f861393 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/7f06739d
> 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>
> [gdavis: Apply changes to drivers/acpi/acpica/{tbutils,tbxfload}.c]
> Signed-off-by: George G. Davis <george_davis@mentor.com>

Can you provide a backported version of this for 3.10?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/4] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers.
  2015-05-12 21:28 ` [PATCH 4/4] " George G. Davis
@ 2015-05-15 20:46   ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2015-05-15 20:46 UTC (permalink / raw)
  To: George G. Davis
  Cc: stable, Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki,
	George G. Davis

On Tue, May 12, 2015 at 05:28:22PM -0400, George G. Davis wrote:
> 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>

Can you also provide a backport for this for 3.10 as well?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3.10 v2 1/2] ACPICA: Utilities: Cleanup to convert physical address printing formats.
  2015-05-15 20:41   ` Greg KH
@ 2015-05-18 19:39     ` George G. Davis
  2015-05-18 19:39       ` [PATCH 3.10 v2 2/2] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers George G. Davis
  0 siblings, 1 reply; 12+ messages in thread
From: George G. Davis @ 2015-05-18 19:39 UTC (permalink / raw)
  To: Greg KH
  Cc: stable, Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki,
	George G. Davis

From: Lv Zheng <lv.zheng@intel.com>

commit cc2080b0e5a7c6c33ef5e9ffccbc2b8f6f861393 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/7f06739d
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>
[gdavis: Move tbinstall.c changes to tbutils.c due to lack of commit
	 "42f4786 ACPICA: Split table print utilities to a new a
	 separate file" in linux-3.10.y]
Signed-off-by: George G. Davis <george_davis@mentor.com>
---
 drivers/acpi/acpica/exfldio.c   | 10 ++++------
 drivers/acpi/acpica/hwvalid.c   | 16 ++++++++--------
 drivers/acpi/acpica/nsdump.c    |  7 +++----
 drivers/acpi/acpica/tbutils.c   |  4 ++--
 drivers/acpi/acpica/utaddress.c | 24 +++++++++++-------------
 5 files changed, 28 insertions(+), 33 deletions(-)

diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index c84ee95..dc210c3 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -269,17 +269,15 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
 	}
 
 	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.
 						      space_id),
 			      rgn_desc->region.space_id,
 			      obj_desc->common_field.access_byte_width,
 			      obj_desc->common_field.base_byte_offset,
-			      field_datum_byte_offset, ACPI_CAST_PTR(void,
-								     (rgn_desc->
-								      region.
-								      address +
-								      region_offset))));
+			      field_datum_byte_offset,
+			      ACPI_FORMAT_UINT64(rgn_desc->region.address +
+						 region_offset)));
 
 	/* Invoke the appropriate address_space/op_region handler */
 
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c
index eab70d5..fae5758 100644
--- a/drivers/acpi/acpica/hwvalid.c
+++ b/drivers/acpi/acpica/hwvalid.c
@@ -142,17 +142,17 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
 	byte_width = ACPI_DIV_8(bit_width);
 	last_address = address + byte_width - 1;
 
-	ACPI_DEBUG_PRINT((ACPI_DB_IO, "Address %p LastAddress %p Length %X",
-			  ACPI_CAST_PTR(void, address), ACPI_CAST_PTR(void,
-								      last_address),
-			  byte_width));
+	ACPI_DEBUG_PRINT((ACPI_DB_IO,
+			  "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X",
+			  ACPI_FORMAT_UINT64(address),
+			  ACPI_FORMAT_UINT64(last_address), byte_width));
 
 	/* Maximum 16-bit address in I/O space */
 
 	if (last_address > ACPI_UINT16_MAX) {
 		ACPI_ERROR((AE_INFO,
-			    "Illegal I/O port address/length above 64K: %p/0x%X",
-			    ACPI_CAST_PTR(void, address), byte_width));
+			    "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X",
+			    ACPI_FORMAT_UINT64(address), byte_width));
 		return_ACPI_STATUS(AE_LIMIT);
 	}
 
@@ -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) {
 				ACPI_DEBUG_PRINT((ACPI_DB_IO,
-						  "Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)",
-						  ACPI_CAST_PTR(void, address),
+						  "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)",
+						  ACPI_FORMAT_UINT64(address),
 						  byte_width, port_info->name,
 						  port_info->start,
 						  port_info->end));
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index ce6e973..d6651e7 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -258,12 +258,11 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 		switch (type) {
 		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.length,
-				       ACPI_CAST_PTR(void,
-						     obj_desc->processor.
-						     address));
+				       ACPI_FORMAT_UINT64(obj_desc->processor.
+							  address));
 			break;
 
 		case ACPI_TYPE_DEVICE:
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index ce3d5db..45c4474 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -474,8 +474,8 @@ acpi_tb_install_table(acpi_physical_address address,
 	table = acpi_os_map_memory(address, sizeof(struct acpi_table_header));
 	if (!table) {
 		ACPI_ERROR((AE_INFO,
-			    "Could not map memory for table [%s] at %p",
-			    signature, ACPI_CAST_PTR(void, address)));
+			    "Could not map memory for table [%s] at %8.8X%8.8X",
+			    signature, ACPI_FORMAT_UINT64(address)));
 		return;
 	}
 
diff --git a/drivers/acpi/acpica/utaddress.c b/drivers/acpi/acpica/utaddress.c
index e0a2e27..3c7770d 100644
--- a/drivers/acpi/acpica/utaddress.c
+++ b/drivers/acpi/acpica/utaddress.c
@@ -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_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_CAST_PTR(void, address),
-			  ACPI_CAST_PTR(void, range_info->end_address)));
+			  ACPI_FORMAT_UINT64(address),
+			  ACPI_FORMAT_UINT64(range_info->end_address)));
 
 	(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
 	return_ACPI_STATUS(AE_OK);
@@ -160,15 +160,13 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id,
 			}
 
 			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->
 								region_node),
-					  ACPI_CAST_PTR(void,
-							range_info->
-							start_address),
-					  ACPI_CAST_PTR(void,
-							range_info->
-							end_address)));
+					  ACPI_FORMAT_UINT64(range_info->
+							     start_address),
+					  ACPI_FORMAT_UINT64(range_info->
+							     end_address)));
 
 			ACPI_FREE(range_info);
 			return_VOID;
@@ -244,9 +242,9 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
 								  region_node);
 
 				ACPI_WARNING((AE_INFO,
-					      "0x%p-0x%p %s conflicts with Region %s %d",
-					      ACPI_CAST_PTR(void, address),
-					      ACPI_CAST_PTR(void, end_address),
+					      "0x%8.8X%8.8X-0x%8.8X%8.8X %s conflicts with Region %s %d",
+					      ACPI_FORMAT_UINT64(address),
+					      ACPI_FORMAT_UINT64(end_address),
 					      acpi_ut_get_region_name(space_id),
 					      pathname, overlap_count));
 				ACPI_FREE(pathname);
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3.10 v2 2/2] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers.
  2015-05-18 19:39     ` [PATCH 3.10 v2 1/2] " George G. Davis
@ 2015-05-18 19:39       ` George G. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: George G. Davis @ 2015-05-18 19:39 UTC (permalink / raw)
  To: Greg KH
  Cc: stable, Dirk Behme, Lv Zheng, Bob Moore, Rafael J. Wysocki,
	George G. Davis

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>
[gdavis: Move tbprint.c changes to tbutils.c due to lack of commit
	 "42f4786 ACPICA: Split table print utilities to a new a
	 separate file" in linux-3.10.y]
Signed-off-by: George G. Davis <george_davis@mentor.com>
---
 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/tbutils.c  | 16 ++++++----------
 7 files changed, 20 insertions(+), 29 deletions(-)

diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h
index 53666bd..32b0bf3 100644
--- 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.
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index e9b13b9..46a37ae 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,
 
 	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(struct acpi_walk_state *walk_state,
 
 	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 */
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
index 8fab926..ad69889 100644
--- a/drivers/acpi/acpica/evregion.c
+++ b/drivers/acpi/acpica/evregion.c
@@ -276,7 +276,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
 	ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
 			  "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
 			  &region_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)));
 
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
index e5a3c24..7e6a56f 100644
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -621,8 +621,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
 			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;
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 182abaf..e90c59d 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -176,7 +176,7 @@ acpi_ex_system_memory_space_handler(u32 function,
 		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);
@@ -197,8 +197,7 @@ acpi_ex_system_memory_space_handler(u32 function,
 
 	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
@@ -300,8 +299,7 @@ acpi_ex_system_io_space_handler(u32 function,
 
 	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 */
 
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index d6651e7..20ae5b9 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -333,8 +333,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 							       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
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 45c4474..5c67b28 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -246,16 +246,12 @@ acpi_tb_print_table_header(acpi_physical_address address,
 {
 	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 %05X",
-			   header->signature, ACPI_CAST_PTR(void, address),
+		ACPI_INFO((AE_INFO, "%4.4s 0x%8.8X%8.8X %05X",
+			   header->signature, ACPI_FORMAT_UINT64(address),
 			   header->length));
 	} else if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_RSDP)) {
 
@@ -266,8 +262,8 @@ acpi_tb_print_table_header(acpi_physical_address address,
 					  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 %05X (v%.2d %6.6s)",
-			   ACPI_CAST_PTR (void, address),
+		ACPI_INFO((AE_INFO, "RSDP 0x%8.8X%8.8X %05X (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,
@@ -281,8 +277,8 @@ acpi_tb_print_table_header(acpi_physical_address address,
 		acpi_tb_cleanup_table_header(&local_header, header);
 
 		ACPI_INFO((AE_INFO,
-			   "%4.4s %p %05X (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 %05X (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,
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings
  2015-05-12 21:28 [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings George G. Davis
                   ` (3 preceding siblings ...)
  2015-05-12 21:28 ` [PATCH 4/4] " George G. Davis
@ 2015-05-19 10:57 ` Luis Henriques
  4 siblings, 0 replies; 12+ messages in thread
From: Luis Henriques @ 2015-05-19 10:57 UTC (permalink / raw)
  To: George G. Davis; +Cc: stable, Dirk Behme, George G. Davis

On Tue, May 12, 2015 at 05:28:18PM -0400, George G. Davis wrote:
> From: "George G. Davis" <george_davis@mentor.com>
> 
> Hello,
> 
> The following changes introduced in the recent v3.14.41 update have introduced
> build warnings for the ARCH=i386 case:
> 
> a26f0f3 ACPICA: Utilities: split IO address types from data type models.
> 8c56b5e ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()
> 

Thanks, I'm queuing all of these patches for the 3.16 kernel as well.

Cheers,
--
Luís

> 
> As of v3.14.41, the following new build warnings exist for the `make ARCH=i386
> i386_defconfig bzImage` case:
> 
>   CC      drivers/acpi/osl.o
> drivers/acpi/osl.c: In function ‘acpi_os_get_root_pointer’:
> drivers/acpi/osl.c:264:3: warning: passing argument 1 of ‘acpi_find_root_pointer’ from incompatible pointer type [enabled by default]
>    acpi_find_root_pointer(&pa);
>    ^
> In file included from include/acpi/acpi.h:64:0,
>                  from include/linux/acpi.h:42,
>                  from drivers/acpi/osl.c:41:
> include/acpi/acpixf.h:178:123: note: expected ‘acpi_size *’ but argument is of type ‘acpi_physical_address *’
>  acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
>                                                                                                                            ^
>   CC      drivers/acpi/acpica/exregion.o
> drivers/acpi/acpica/exregion.c: In function ‘acpi_ex_system_memory_space_handler’:
> drivers/acpi/acpica/exregion.c:182:4: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 5 has type ‘acpi_physical_address’ [-Wformat=]
>     ACPI_ERROR((AE_INFO,
>     ^
>   CC      drivers/acpi/acpica/hwvalid.o
> drivers/acpi/acpica/hwvalid.c: In function ‘acpi_hw_validate_io_request’:
> drivers/acpi/acpica/hwvalid.c:153:103: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    ACPI_ERROR((AE_INFO,
>                                                                                                        ^
>   CC      drivers/acpi/acpica/tbinstal.o
> drivers/acpi/acpica/tbinstal.c: In function ‘acpi_tb_table_override’:
> drivers/acpi/acpica/tbinstal.c:294:167: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>     ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
>                                                                                                                                                                        ^
> drivers/acpi/acpica/tbinstal.c:311:117: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   ACPI_INFO((AE_INFO,
>                                                                                                                      ^
>   CC      drivers/acpi/acpica/tbprint.o
> drivers/acpi/acpica/tbprint.c: In function ‘acpi_tb_print_table_header’:
> drivers/acpi/acpica/tbprint.c:138:84: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    ACPI_INFO((AE_INFO, "%4.4s %p %06X",
>                                                                                     ^
> drivers/acpi/acpica/tbprint.c:150:78: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    ACPI_INFO((AE_INFO, "RSDP %p %06X (v%.2d %6.6s)",
>                                                                               ^
> drivers/acpi/acpica/tbprint.c:164:125: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    ACPI_INFO((AE_INFO,
>                                                                                                                              ^
>   CC      drivers/acpi/acpica/tbutils.o
> drivers/acpi/acpica/tbutils.c: In function ‘acpi_tb_install_table’:
> drivers/acpi/acpica/tbutils.c:229:105: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    ACPI_ERROR((AE_INFO,
>                                                                                                          ^
>   CC      drivers/acpi/acpica/tbxfload.o
> drivers/acpi/acpica/tbxfload.c: In function ‘acpi_tb_load_namespace’:
> drivers/acpi/acpica/tbxfload.c:187:126: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>     ACPI_INFO((AE_INFO, "Ignoring %4.4s at %p",
>                                                                                                                               ^
>   CC      drivers/acpi/acpica/utaddress.o
> drivers/acpi/acpica/utaddress.c: In function ‘acpi_ut_check_address_range’:
> drivers/acpi/acpica/utaddress.c:247:149: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>      ACPI_WARNING((AE_INFO,
>                                                                                                                                                      ^
> drivers/acpi/acpica/utaddress.c:247:180: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>      ACPI_WARNING((AE_INFO,
>                                                                                                                                                                                     ^
> drivers/acpi/acpica/utaddress.c:247:215: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>      ACPI_WARNING((AE_INFO,
>                                                                                                                                                                                                                        ^
> drivers/acpi/acpica/utaddress.c:247:265: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>      ACPI_WARNING((AE_INFO,
>                                                                                                                                                                                                                                                                          ^
> 
> The following upstream commits have been backported to v3.14.41 in order to
> resolve the above build warnings:
> 
> Lv Zheng (4):
>   ACPICA: Tables: Change acpi_find_root_pointer() to use
>     acpi_physical_address.
>   ACPICA: Utilities: Cleanup to enforce
>     ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR().
>   ACPICA: Utilities: Cleanup to convert physical address printing
>     formats.
>   ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx
>     helpers.
> 
>  drivers/acpi/acpica/acmacros.h  | 10 +++-------
>  drivers/acpi/acpica/dsopcode.c  |  7 +++----
>  drivers/acpi/acpica/evregion.c  |  2 +-
>  drivers/acpi/acpica/exdump.c    |  4 ++--
>  drivers/acpi/acpica/exfldio.c   | 10 ++++------
>  drivers/acpi/acpica/exregion.c  |  8 +++-----
>  drivers/acpi/acpica/hwvalid.c   | 16 ++++++++--------
>  drivers/acpi/acpica/nsdump.c    | 12 ++++++------
>  drivers/acpi/acpica/tbinstal.c  |  5 ++---
>  drivers/acpi/acpica/tbprint.c   | 17 +++++++----------
>  drivers/acpi/acpica/tbutils.c   |  4 ++--
>  drivers/acpi/acpica/tbxfload.c  |  7 +++----
>  drivers/acpi/acpica/tbxfroot.c  |  7 ++++---
>  drivers/acpi/acpica/utaddress.c | 34 +++++++++++++++-------------------
>  include/acpi/acpixf.h           |  2 +-
>  15 files changed, 64 insertions(+), 81 deletions(-)
> 
> Please review and apply.
> 
> Thanks in advance!
> 
> --
> Regards,
> George
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-05-19 10:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-12 21:28 [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings George G. Davis
2015-05-12 21:28 ` [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address George G. Davis
2015-05-15  1:43   ` Greg KH
2015-05-15 15:01     ` George G. Davis
2015-05-12 21:28 ` [PATCH 2/4] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() George G. Davis
2015-05-12 21:28 ` [PATCH 3/4] ACPICA: Utilities: Cleanup to convert physical address printing formats George G. Davis
2015-05-15 20:41   ` Greg KH
2015-05-18 19:39     ` [PATCH 3.10 v2 1/2] " George G. Davis
2015-05-18 19:39       ` [PATCH 3.10 v2 2/2] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers George G. Davis
2015-05-12 21:28 ` [PATCH 4/4] " George G. Davis
2015-05-15 20:46   ` Greg KH
2015-05-19 10:57 ` [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings Luis Henriques

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.