Re: [PATCH v2 15/15] x86: convert to setup_initial_init_mm()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2021/6/8 8:26, Andrew Morton wrote:
On Fri, 4 Jun 2021 15:06:33 +0800 Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote:

Use setup_initial_init_mm() helper to simplify code.

...

--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -868,10 +868,7 @@ void __init setup_arch(char **cmdline_p)
if (!boot_params.hdr.root_flags)
  		root_mountflags &= ~MS_RDONLY;
-	init_mm.start_code = (unsigned long) _text;
-	init_mm.end_code = (unsigned long) _etext;
-	init_mm.end_data = (unsigned long) _edata;
-	init_mm.brk = _brk_end;
+	setup_initial_init_mm(_text, _etext, _edata, _brk_end);
code_resource.start = __pa_symbol(_text);
  	code_resource.end = __pa_symbol(_etext)-1;
arch/x86/kernel/setup.c:873:47: warning: passing argument 4 of 'setup_initial_init_mm' makes pointer from integer without a cast [-Wint-conversion]
   873 |  setup_initial_init_mm(_text, _etext, _edata, _brk_end);
       |                                               ^~~~~~~~
       |                                               |
       |                                               long unsigned int
In file included from ./include/linux/pid_namespace.h:7,
                  from ./include/linux/ptrace.h:10,
                  from ./include/linux/elfcore.h:11,
                  from ./include/linux/crash_core.h:6,
                  from ./include/linux/kexec.h:18,
                  from ./include/linux/crash_dump.h:5,
                  from arch/x86/kernel/setup.c:9:
./include/linux/mm.h:248:29: note: expected 'void *' but argument is of type 'long unsigned int'
   248 |       void *end_data, void *brk);
       |                       ~~~~~~^~~


afaict the other architectures will warn this way, not sure.

I check all archs again, the x86/m68k/powerpc/h8300 has use some value which is not pointer ,

other are changed, but forget this one.  I do compile, but I don't know why I missed it, sorry about

this.



Please check all that, refresh ,retest and resend?
.






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux