diff options
author | Lv Zheng <lv.zheng@intel.com> | 2015-04-12 23:48:18 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-14 08:51:50 -0400 |
commit | f254e3c57b9d952e987502aefa0804c177dd2503 (patch) | |
tree | 9a2d1ce8a0d8a16744e3411614b9720e0798928c | |
parent | 18ae90214d385e9b992ead6653e6976b42097978 (diff) |
ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_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: 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>
-rw-r--r-- | drivers/acpi/acpica/tbxfroot.c | 7 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 12 |
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c index e1416a2183cf..fa76a3603aa1 100644 --- a/drivers/acpi/acpica/tbxfroot.c +++ b/drivers/acpi/acpica/tbxfroot.c | |||
@@ -142,7 +142,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp) | |||
142 | * | 142 | * |
143 | ******************************************************************************/ | 143 | ******************************************************************************/ |
144 | 144 | ||
145 | acpi_status __init acpi_find_root_pointer(acpi_size * table_address) | 145 | acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address) |
146 | { | 146 | { |
147 | u8 *table_ptr; | 147 | u8 *table_ptr; |
148 | u8 *mem_rover; | 148 | u8 *mem_rover; |
@@ -200,7 +200,8 @@ acpi_status __init acpi_find_root_pointer(acpi_size * table_address) | |||
200 | physical_address += | 200 | physical_address += |
201 | (u32) ACPI_PTR_DIFF(mem_rover, table_ptr); | 201 | (u32) ACPI_PTR_DIFF(mem_rover, table_ptr); |
202 | 202 | ||
203 | *table_address = physical_address; | 203 | *table_address = |
204 | (acpi_physical_address) physical_address; | ||
204 | return_ACPI_STATUS(AE_OK); | 205 | return_ACPI_STATUS(AE_OK); |
205 | } | 206 | } |
206 | } | 207 | } |
@@ -233,7 +234,7 @@ acpi_status __init acpi_find_root_pointer(acpi_size * table_address) | |||
233 | (ACPI_HI_RSDP_WINDOW_BASE + | 234 | (ACPI_HI_RSDP_WINDOW_BASE + |
234 | ACPI_PTR_DIFF(mem_rover, table_ptr)); | 235 | ACPI_PTR_DIFF(mem_rover, table_ptr)); |
235 | 236 | ||
236 | *table_address = physical_address; | 237 | *table_address = (acpi_physical_address) physical_address; |
237 | return_ACPI_STATUS(AE_OK); | 238 | return_ACPI_STATUS(AE_OK); |
238 | } | 239 | } |
239 | 240 | ||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index d56f5d722138..65aa4fa0ae4e 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -431,13 +431,13 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void)) | |||
431 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) | 431 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) |
432 | 432 | ||
433 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init | 433 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init |
434 | acpi_find_root_pointer(acpi_size * rsdp_address)) | 434 | acpi_find_root_pointer(acpi_physical_address * |
435 | 435 | rsdp_address)) | |
436 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | 436 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
437 | acpi_get_table_header(acpi_string signature, | 437 | acpi_get_table_header(acpi_string signature, |
438 | u32 instance, | 438 | u32 instance, |
439 | struct acpi_table_header | 439 | struct acpi_table_header |
440 | *out_table_header)) | 440 | *out_table_header)) |
441 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | 441 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
442 | acpi_get_table(acpi_string signature, u32 instance, | 442 | acpi_get_table(acpi_string signature, u32 instance, |
443 | struct acpi_table_header | 443 | struct acpi_table_header |