public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH 07/15] m68k: convert to setup_initial_init_mm()
       [not found] <20210529105504.180544-1-wangkefeng.wang@huawei.com>
@ 2021-05-29 10:54 ` Kefeng Wang
  2021-05-31  7:48   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Kefeng Wang @ 2021-05-29 10:54 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel; +Cc: Kefeng Wang, Geert Uytterhoeven, linux-m68k

Use setup_initial_init_mm() helper to simplify code.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/m68k/kernel/setup_mm.c | 5 +----
 arch/m68k/kernel/setup_no.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
index 017bac3aab80..4b51bfd38e5f 100644
--- a/arch/m68k/kernel/setup_mm.c
+++ b/arch/m68k/kernel/setup_mm.c
@@ -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);
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c
index d1b7988efc91..541b134ed8fc 100644
--- a/arch/m68k/kernel/setup_no.c
+++ b/arch/m68k/kernel/setup_no.c
@@ -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, (void *)0);
 
 	config_BSP(&command_line[0], sizeof(command_line));
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 07/15] m68k: convert to setup_initial_init_mm()
  2021-05-29 10:54 ` [PATCH 07/15] m68k: convert to setup_initial_init_mm() Kefeng Wang
@ 2021-05-31  7:48   ` Geert Uytterhoeven
  2021-06-02 13:13     ` Greg Ungerer
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-05-31  7:48 UTC (permalink / raw)
  To: Kefeng Wang
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-m68k,
	Greg Ungerer

Hi Kefeng

(CC Greg for m68knommu)

On Sat, May 29, 2021 at 12:46 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> Use setup_initial_init_mm() helper to simplify code.
>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: linux-m68k@lists.linux-m68k.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Thanks for your patch!

> --- a/arch/m68k/kernel/setup_mm.c
> +++ b/arch/m68k/kernel/setup_mm.c
> @@ -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);

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

> --- a/arch/m68k/kernel/setup_no.c
> +++ b/arch/m68k/kernel/setup_no.c
> @@ -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, (void *)0);

Please use NULL instead of (void *)0.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 07/15] m68k: convert to setup_initial_init_mm()
  2021-05-31  7:48   ` Geert Uytterhoeven
@ 2021-06-02 13:13     ` Greg Ungerer
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Ungerer @ 2021-06-02 13:13 UTC (permalink / raw)
  To: Geert Uytterhoeven, Kefeng Wang
  Cc: Andrew Morton, Linux Kernel Mailing List, linux-m68k


On 31/5/21 5:48 pm, Geert Uytterhoeven wrote:
> Hi Kefeng
> 
> (CC Greg for m68knommu)
> 
> On Sat, May 29, 2021 at 12:46 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> Use setup_initial_init_mm() helper to simplify code.
>>
>> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
>> Cc: linux-m68k@lists.linux-m68k.org
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> 
> Thanks for your patch!
> 
>> --- a/arch/m68k/kernel/setup_mm.c
>> +++ b/arch/m68k/kernel/setup_mm.c
>> @@ -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);
> 
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> 
>> --- a/arch/m68k/kernel/setup_no.c
>> +++ b/arch/m68k/kernel/setup_no.c
>> @@ -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, (void *)0);
> 
> Please use NULL instead of (void *)0.

With that in place, no problems I see.

Acked-by: Greg Ungerer <gerg@linux-m68k.org>


> Gr{oetje,eeting}s,
> 
>                          Geert
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-02 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20210529105504.180544-1-wangkefeng.wang@huawei.com>
2021-05-29 10:54 ` [PATCH 07/15] m68k: convert to setup_initial_init_mm() Kefeng Wang
2021-05-31  7:48   ` Geert Uytterhoeven
2021-06-02 13:13     ` Greg Ungerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox