Skip to content

Commit 1966db6

Browse files
cuiyunhuipalmer-dabbelt
authored andcommitted
RISC-V: ACPI: fix early_ioremap to early_memremap
When SVPBMT is enabled, __acpi_map_table() will directly access the data in DDR through the IO attribute, rather than through hardware cache consistency, resulting in incorrect data in the obtained ACPI table. The log: ACPI: [ACPI:0x18] Invalid zero length. We do not assume whether the bootloader flushes or not. We should access in a cacheable way instead of maintaining cache consistency by software. Fixes: 3b426d4 ("RISC-V: ACPI : Fix for usage of pointers in different address space") Cc: [email protected] Reviewed-by: Alexandre Ghiti <[email protected]> Signed-off-by: Yunhui Cui <[email protected]> Reviewed-by: Sunil V L <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent cfb10de commit 1966db6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/riscv/kernel/acpi.c

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

213-
return early_ioremap(phys, size);
213+
return early_memremap(phys, size);
214214
}
215215

216216
void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
217217
{
218218
if (!map || !size)
219219
return;
220220

221-
early_iounmap(map, size);
221+
early_memunmap(map, size);
222222
}
223223

224224
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)

0 commit comments

Comments
 (0)