From: Sunil V L Date: Wed, 7 Jun 2023 11:24:16 +0000 (+0530) Subject: RISC-V: ACPI : Fix for usage of pointers in different address space X-Git-Tag: v6.6.7~2493^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b426d4b5b1462b8da31d4e631ac4f3c6270e9e1;p=platform%2Fkernel%2Flinux-starfive.git RISC-V: ACPI : Fix for usage of pointers in different address space The arch specific __acpi_map_table can be wrapper around either early_memremap or early_ioremap. But early_memremap routine works with normal pointers whereas __acpi_map_table expects pointers in iomem address space. This causes kernel test bot to fail while using the sparse tool. Fix the issue by using early_ioremap and similar fix done for __acpi_unmap_table. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305201427.I7QhPjNW-lkp@intel.com/ Fixes: a91a9ffbd3a5 ("RISC-V: Add support to build the ACPI core") Signed-off-by: Sunil V L Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230607112417.782085-2-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/acpi.c b/arch/riscv/kernel/acpi.c index df5a45a..5ee03eb 100644 --- a/arch/riscv/kernel/acpi.c +++ b/arch/riscv/kernel/acpi.c @@ -204,7 +204,7 @@ void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size) if (!size) return NULL; - return early_memremap(phys, size); + return early_ioremap(phys, size); } void __init __acpi_unmap_table(void __iomem *map, unsigned long size) @@ -212,7 +212,7 @@ void __init __acpi_unmap_table(void __iomem *map, unsigned long size) if (!map || !size) return; - early_memunmap(map, size); + early_iounmap(map, size); } void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)