summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorStuart Menefy <stuart.menefy@codasip.com>2024-06-24 13:17:23 +0100
committerPalmer Dabbelt <palmer@rivosinc.com>2024-09-14 01:08:56 -0700
commitd6a1928134a1c626ff369129d7a80951b2949a48 (patch)
treecd2e84124c0782b2983a2c1bd339261aecafef8b /arch/riscv
parent7587a3602bf2f12e798ea955b17521948ddb56a5 (diff)
riscv: Remove redundant restriction on memory size
The original reason for reserving the top 4GiB of the direct map (space for modules/BPF/kernel) hasn't applied since the address map was reworked for KASAN. Signed-off-by: Stuart Menefy <stuart.menefy@codasip.com> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20240624121723.2186279-1-stuart.menefy@codasip.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/mm/init.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index f43139db82a9..0e56725377a4 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -1132,13 +1132,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
kernel_map.va_pa_offset = IS_ENABLED(CONFIG_64BIT) ?
0UL : PAGE_OFFSET - kernel_map.phys_addr;
- /*
- * The default maximal physical memory size is KERN_VIRT_SIZE for 32-bit
- * kernel, whereas for 64-bit kernel, the end of the virtual address
- * space is occupied by the modules/BPF/kernel mappings which reduces
- * the available size of the linear mapping.
- */
- memory_limit = KERN_VIRT_SIZE - (IS_ENABLED(CONFIG_64BIT) ? SZ_4G : 0);
+ memory_limit = KERN_VIRT_SIZE;
/* Sanity check alignment and size */
BUG_ON((PAGE_OFFSET % PGDIR_SIZE) != 0);