aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2019-01-07 19:19:14 +0530
committerAnup Patel <anup@brainfault.org>2019-02-21 10:31:48 +0530
commit680f9b8e6c56414b6ade41e01950cc1318856b6b (patch)
tree7f5f53e13c8583f64a6353c4d4df33f01b0722f1 /arch/riscv
parentriscv: remove the HAVE_KPROBES option (diff)
downloadlinux-dev-680f9b8e6c56414b6ade41e01950cc1318856b6b.tar.xz
linux-dev-680f9b8e6c56414b6ade41e01950cc1318856b6b.zip
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: Anup Patel <anup.patel@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/kernel/setup.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index fb09e0136026..6a8a89740b7c 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -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();
}
-