Skip to content

Commit 3b426d4

Browse files
vlsunilpalmer-dabbelt
authored andcommitted
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 <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202305201427.I7QhPjNW-lkp@intel.com/ Fixes: a91a9ff ("RISC-V: Add support to build the ACPI core") Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20230607112417.782085-2-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent c6399b8 commit 3b426d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/riscv/kernel/acpi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
204204
if (!size)
205205
return NULL;
206206

207-
return early_memremap(phys, size);
207+
return early_ioremap(phys, size);
208208
}
209209

210210
void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
211211
{
212212
if (!map || !size)
213213
return;
214214

215-
early_memunmap(map, size);
215+
early_iounmap(map, size);
216216
}
217217

218218
void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)

0 commit comments

Comments
 (0)