[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zw9991h7QtX2S__m@sunil-laptop>
Date: Wed, 16 Oct 2024 14:18:55 +0530
From: Sunil V L <sunilvl@...tanamicro.com>
To: Yunhui Cui <cuiyunhui@...edance.com>
Cc: punit.agrawal@...edance.com, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu, alexghiti@...osinc.com,
conor.dooley@...rochip.com, rafael.j.wysocki@...el.com,
haibo1.xu@...el.com, jeeheng.sia@...rfivetech.com,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] RISC-V: ACPI: fix early_ioremap to early_memremap
On Mon, Oct 14, 2024 at 09:01:41PM +0800, Yunhui Cui wrote:
> 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: 3b426d4b5b14 ("RISC-V: ACPI : Fix for usage of pointers in different address space")
> Reviewed-by: Alexandre Ghiti <alexghiti@...osinc.com>
> Signed-off-by: Yunhui Cui <cuiyunhui@...edance.com>
> ---
> arch/riscv/kernel/acpi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/kernel/acpi.c b/arch/riscv/kernel/acpi.c
> index 6e0d333f57e5..2fd29695a788 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)
> @@ -218,7 +218,7 @@ void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
> if (!map || !size)
> return;
>
> - early_iounmap(map, size);
> + early_memunmap(map, size);
> }
>
Reviewed-by: Sunil V L <sunilvl@...tanamicro.com>
Thanks,
Sunil
Powered by blists - more mailing lists