Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: ACPI: fix early_ioremap to early_memremap
@ 2024-10-14  9:47 Yunhui Cui
  2024-10-14 11:35 ` Sunil V L
  2024-10-14 12:12 ` Alexandre Ghiti
  0 siblings, 2 replies; 11+ messages in thread
From: Yunhui Cui @ 2024-10-14  9:47 UTC (permalink / raw)
  To: punit.agrawal, paul.walmsley, palmer, aou, sunilvl, cuiyunhui,
	ajones, alexghiti, jeeheng.sia, haibo1.xu, linux-riscv,
	linux-kernel

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.

Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com>
---
 arch/riscv/kernel/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/acpi.c b/arch/riscv/kernel/acpi.c
index 6e0d333f57e5..3177c9af8764 100644
--- a/arch/riscv/kernel/acpi.c
+++ b/arch/riscv/kernel/acpi.c
@@ -210,7 +210,7 @@ void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
 	if (!size)
 		return NULL;
 
-	return early_ioremap(phys, size);
+	return early_memremap(phys, size);
 }
 
 void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
-- 
2.39.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-11-04  3:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14  9:47 [PATCH] RISC-V: ACPI: fix early_ioremap to early_memremap Yunhui Cui
2024-10-14 11:35 ` Sunil V L
2024-10-14 12:29   ` [External] " yunhui cui
2024-10-14 12:12 ` Alexandre Ghiti
2024-10-14 12:30   ` [External] " yunhui cui
2024-10-14 13:01     ` Alexandre Ghiti
2024-10-21  6:45       ` yunhui cui
2024-10-28 13:37         ` Alexandre Ghiti
2024-10-29  3:04           ` yunhui cui
2024-10-29  4:08             ` Sunil V L
2024-11-04  3:43               ` yunhui cui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox