Re: [PATCH 2/2] riscv: mm: Define DIRECT_MAP_PHYSMEM_END

From: Paul Walmsley

Date: Thu Jun 04 2026 - 18:35:00 EST


On Mon, 9 Mar 2026, Vivian Wang wrote:

> On RISC-V, the actual mappable range of physical address space is
> dependent on the current MMU mode i.e. satp_mode (See
> Documentation/arch/riscv/vm-layout.rst).
>
> Define the DIRECT_MAP_PHYSMEM_END macro based on the existing virtual
> address space layout macros to expose this information to
> get_free_mem_region(). Otherwise, it returns a region that couldn't be
> mapped, which breaks ZONE_DEVICE.
>
> Cc: <stable@xxxxxxxxxxxxxxx> # v6.13+
> Tested-by: Han Gao <gaohan@xxxxxxxxxxx> # SG2044
> Signed-off-by: Vivian Wang <wangruikang@xxxxxxxxxxx>

Thanks, queued for v7.2.


- Paul