riscv: Support CONFIG_RELOCATABLE on riscv32
authorSamuel Holland <samuel.holland@sifive.com>
Sat, 26 Oct 2024 17:13:57 +0000 (10:13 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 26 Mar 2025 22:56:45 +0000 (15:56 -0700)
commitea2bde36a46d5724c1b44d80cc9fafbd73c2ecf9
tree9c181df489c20b76c583d8b4ce6ef08b589867e8
parentd073a571e68f42414f8f06f01b59f52224538a83
riscv: Support CONFIG_RELOCATABLE on riscv32

When adjusted to use the correctly-sized ELF types, relocate_kernel()
works on riscv32 as well. The caveat about crossing an intermediate page
table boundary does not apply to riscv32, since for Sv32 the early
kernel mapping uses only PGD entries. Since KASLR is not yet supported
on riscv32, this option is mostly useful for NOMMU.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20241026171441.3047904-6-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Kconfig
arch/riscv/mm/init.c