Skip to content

Commit

Permalink
ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_…
Browse files Browse the repository at this point in the history
…address.

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: acpica/acpica@7d9fd643
Signed-off-by: Lv Zheng <[email protected]>
Signed-off-by: Bob Moore <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Lv Zheng authored and rafaeljw committed Apr 14, 2015
1 parent 18ae902 commit f254e3c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions drivers/acpi/acpica/tbxfroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,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;
Expand Down Expand Up @@ -200,7 +200,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);
}
}
Expand Down Expand Up @@ -233,7 +234,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);
}

Expand Down
12 changes: 6 additions & 6 deletions include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,13 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))

ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
acpi_find_root_pointer(acpi_size * rsdp_address))

acpi_find_root_pointer(acpi_physical_address *
rsdp_address))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_get_table_header(acpi_string signature,
u32 instance,
struct acpi_table_header
*out_table_header))
acpi_get_table_header(acpi_string signature,
u32 instance,
struct acpi_table_header
*out_table_header))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_get_table(acpi_string signature, u32 instance,
struct acpi_table_header
Expand Down

0 comments on commit f254e3c

Please sign in to comment.