RISC-V: mm: Restrict address space for sv39,sv48,sv57
authorCharlie Jenkins <charlie@rivosinc.com>
Wed, 9 Aug 2023 23:22:01 +0000 (16:22 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 23 Aug 2023 21:54:12 +0000 (14:54 -0700)
commitadd2cc6b6515f78d3a150f1fbbaf12c28c4bb20a
tree0da0e3e7527e101585eda5a6e9beec4503e8fd0b
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
RISC-V: mm: Restrict address space for sv39,sv48,sv57

Make sv48 the default address space for mmap as some applications
currently depend on this assumption. A hint address passed to mmap will
cause the largest address space that fits entirely into the hint to be
used. If the hint is less than or equal to 1<<38, an sv39 address will
be used. An exception is that if the hint address is 0, then a sv48
address will be used. After an address space is completely full, the next
smallest address space will be used.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20230809232218.849726-2-charlie@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/elf.h
arch/riscv/include/asm/pgtable.h
arch/riscv/include/asm/processor.h