re: [patch v3 2/5] acpi / boot: correct address space of __acpi_map_table()

From: yury norov
Date: Wed Jul 19 2017 - 09:06:59 EST


Hi Andy,

> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index 09ddb3cd627a..6d5b1346268a 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -118,7 +118,7 @@ static u32 isa_irq_to_gsi[nr_irqs_legacy] __read_mostly = {
> * this is just a simple wrapper around early_ioremap(),
> * with sanity checks for phys == 0 and size == 0.
> */
> -char *__init __acpi_map_table(unsigned long phys, unsigned long size)
> +void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
> {
>
> if (!phys || !size)
> @@ -127,7 +127,7 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
> return early_ioremap(phys, size);
> }

I just found this patch in next tree, and it seems it breaks build for
arm64, and probably for ia64:

arch/arm64/kernel/acpi.c:98:14: error: conflicting types for â__acpi_map_tableâ
char *__init __acpi_map_table(unsigned long phys, unsigned long size)
^~~~~~~~~~~~~~~~
in file included from arch/arm64/kernel/acpi.c:18:0:
./include/linux/acpi.h:231:15: note: previous declaration of â__acpi_map_tableâ was here
void __iomem *__acpi_map_table(unsigned long phys_addr, unsigned long size);
^~~~~~~~~~~~~~~~
arch/arm64/kernel/acpi.c:106:13: error: conflicting types for â__acpi_unmap_tableâ
void __init __acpi_unmap_table(char *map, unsigned long size)
^~~~~~~~~~~~~~~~~~
in file included from arch/arm64/kernel/acpi.c:18:0:
./include/linux/acpi.h:232:6: note: previous declaration of â__acpi_unmap_tableâ was here
void __acpi_unmap_table(void __iomem *map, unsigned long size);
^~~~~~~~~~~~~~~~~~

the patch below fixes it. (Tested on arm64 only.)

Yury