]> git.baikalelectronics.ru Git - kernel.git/commitdiff
m68k: convert to setup_initial_init_mm()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Thu, 8 Jul 2021 01:08:40 +0000 (18:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Jul 2021 18:48:21 +0000 (11:48 -0700)
Use setup_initial_init_mm() helper to simplify code.

Link: https://lkml.kernel.org/r/20210608083418.137226-8-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/m68k/kernel/setup_mm.c
arch/m68k/kernel/setup_no.c

index 017bac3aab80bb7a9a2badda5be2be1e9291af82..4b51bfd38e5f27355e44be3aacb408b1054444d2 100644 (file)
@@ -258,10 +258,7 @@ void __init setup_arch(char **cmdline_p)
                }
        }
 
-       init_mm.start_code = PAGE_OFFSET;
-       init_mm.end_code = (unsigned long)_etext;
-       init_mm.end_data = (unsigned long)_edata;
-       init_mm.brk = (unsigned long)_end;
+       setup_initial_init_mm((void *)PAGE_OFFSET, _etext, _edata, _end);
 
 #if defined(CONFIG_BOOTPARAM)
        strncpy(m68k_command_line, CONFIG_BOOTPARAM_STRING, CL_SIZE);
index d1b7988efc91b1a00a84a49219fbc62b6158da42..5e4104f07a4430b4e65add06c7eaca5ba6f7a68b 100644 (file)
@@ -87,10 +87,7 @@ void __init setup_arch(char **cmdline_p)
        memory_start = PAGE_ALIGN(_ramstart);
        memory_end = _ramend;
 
-       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) 0;
+       setup_initial_init_mm(_stext, _etext, _edata, NULL);
 
        config_BSP(&command_line[0], sizeof(command_line));