Skip to content

Commit

Permalink
RISC-V: Setup init_mm before parse_early_param()
Browse files Browse the repository at this point in the history
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: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
  • Loading branch information
Anup Patel authored and Anup Patel committed Feb 21, 2019
1 parent 79a47ba commit 680f9b8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions arch/riscv/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -231,4 +231,3 @@ void __init setup_arch(char **cmdline_p)

riscv_fill_hwcap();
}

0 comments on commit 680f9b8

Please sign in to comment.