Skip to content

Commit d6a1928

Browse files
Stuart Menefypalmer-dabbelt
authored andcommitted
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 <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 7587a36 commit d6a1928

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/riscv/mm/init.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,13 +1132,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
11321132
kernel_map.va_pa_offset = IS_ENABLED(CONFIG_64BIT) ?
11331133
0UL : PAGE_OFFSET - kernel_map.phys_addr;
11341134

1135-
/*
1136-
* The default maximal physical memory size is KERN_VIRT_SIZE for 32-bit
1137-
* kernel, whereas for 64-bit kernel, the end of the virtual address
1138-
* space is occupied by the modules/BPF/kernel mappings which reduces
1139-
* the available size of the linear mapping.
1140-
*/
1141-
memory_limit = KERN_VIRT_SIZE - (IS_ENABLED(CONFIG_64BIT) ? SZ_4G : 0);
1135+
memory_limit = KERN_VIRT_SIZE;
11421136

11431137
/* Sanity check alignment and size */
11441138
BUG_ON((PAGE_OFFSET % PGDIR_SIZE) != 0);

0 commit comments

Comments
 (0)