]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: Allow NOMMU kernels to access all of RAM
authorSamuel Holland <samuel.holland@sifive.com>
Sat, 26 Oct 2024 17:13:54 +0000 (10:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:41:54 +0000 (14:41 +0200)
commitbbf3bb6ddea47f6270224308eaa9d8b8ff72062f
treec5ac4c1f64781343477cf7a5c23e94d03d7420d7
parent09096ead92f39292267ab10113e4c7df4b9ed3f7
riscv: Allow NOMMU kernels to access all of RAM

[ Upstream commit 2c0391b29b27f315c1b4c29ffde66f50b29fab99 ]

NOMMU kernels currently cannot access memory below the kernel link
address. Remove this restriction by setting PAGE_OFFSET to the actual
start of RAM, as determined from the devicetree. The kernel link address
must be a constant, so keep using CONFIG_PAGE_OFFSET for that purpose.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Jesse Taube <mr.bossman075@gmail.com>
Link: https://lore.kernel.org/r/20241026171441.3047904-3-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/include/asm/page.h
arch/riscv/include/asm/pgtable.h