Commit 680f9b8e authored by Anup Patel's avatar Anup Patel Committed by Anup Patel

RISC-V: Setup init_mm before parse_early_param()

We should setup init_mm before doing parse_early_param() in setup_arch()
to be consistent with setup_arch() of other architectures such as x86,
ARM, and ARM64.
Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 79a47bad
......@@ -204,15 +204,15 @@ static void __init setup_bootmem(void)
void __init setup_arch(char **cmdline_p)
{
*cmdline_p = boot_command_line;
parse_early_param();
init_mm.start_code = (unsigned long) _stext;
init_mm.end_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata;
init_mm.brk = (unsigned long) _end;
*cmdline_p = boot_command_line;
parse_early_param();
setup_bootmem();
paging_init();
unflatten_device_tree();
......@@ -231,4 +231,3 @@ void __init setup_arch(char **cmdline_p)
riscv_fill_hwcap();
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment