Skip to content

Commit

Permalink
RISC-V: ACPI : Fix for usage of pointers in different address space
Browse files Browse the repository at this point in the history
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 <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: a91a9ff ("RISC-V: Add support to build the ACPI core")
Signed-off-by: Sunil V L <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
  • Loading branch information
vlsunil authored and palmer-dabbelt committed Jun 19, 2023
1 parent c6399b8 commit 3b426d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/riscv/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ 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)
{
if (!map || !size)
return;

early_memunmap(map, size);
early_iounmap(map, size);
}

void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
Expand Down

0 comments on commit 3b426d4

Please sign in to comment.