lkml.org 
[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 2/6] RISC-V: Setup init_mm before parse_early_param()
    Date
    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>
    ---
    arch/riscv/kernel/setup.c | 9 ++++-----
    1 file changed, 4 insertions(+), 5 deletions(-)

    diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
    index 36f60b4d2147..9e6395b7d409 100644
    --- a/arch/riscv/kernel/setup.c
    +++ b/arch/riscv/kernel/setup.c
    @@ -208,15 +208,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();
    @@ -235,4 +235,3 @@ void __init setup_arch(char **cmdline_p)

    riscv_fill_hwcap();
    }
    -
    --
    2.17.1
    \
     
     \ /
      Last update: 2019-02-12 15:00    [W:4.852 / U:0.708 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site