We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f806982 commit c3bcc65Copy full SHA for c3bcc65
arch/riscv/mm/init.c
@@ -214,8 +214,13 @@ static void __init setup_bootmem(void)
214
memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
215
216
phys_ram_end = memblock_end_of_DRAM();
217
+
218
+ /*
219
+ * Make sure we align the start of the memory on a PMD boundary so that
220
+ * at worst, we map the linear mapping with PMD mappings.
221
+ */
222
if (!IS_ENABLED(CONFIG_XIP_KERNEL))
- phys_ram_base = memblock_start_of_DRAM();
223
+ phys_ram_base = memblock_start_of_DRAM() & PMD_MASK;
224
225
/*
226
* In 64-bit, any use of __va/__pa before this point is wrong as we
0 commit comments