Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-12 Thread Thomas Bogendoerfer
On Fri, Oct 09, 2020 at 05:15:37PM +0300, Serge Semin wrote: > On Fri, Oct 09, 2020 at 02:07:52PM +0200, Thomas Bogendoerfer wrote: > > On Thu, Oct 08, 2020 at 06:20:06PM +0300, Serge Semin wrote: > > > > @@ -426,13 +387,14 @@ static int __init early_parse_memmap(char *p) > > > > > > > >

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-09 Thread Serge Semin
On Fri, Oct 09, 2020 at 02:07:52PM +0200, Thomas Bogendoerfer wrote: > On Thu, Oct 08, 2020 at 06:20:06PM +0300, Serge Semin wrote: > > > Signed-off-by: Thomas Bogendoerfer > > > --- > > > Changes in v2: > > > fixed missing memblock include in fw/sni/sniprom.c > > > tested on cobalt, IP22, IP2

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-09 Thread Thomas Bogendoerfer
On Fri, Oct 09, 2020 at 11:00:36AM +0800, Jiaxun Yang wrote: > > > 在 2020/10/8 23:20, Serge Semin 写道: > > [...] > > > >>- add_memory_region(LOONGSON_HIGHMEM_START, > >>- highmemsize << 20, BOOT_MEM_RAM); > >>- > >>- add_memory_region(LOONGSON_PCI_MEM_END +

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-09 Thread Thomas Bogendoerfer
On Thu, Oct 08, 2020 at 06:20:06PM +0300, Serge Semin wrote: > > Signed-off-by: Thomas Bogendoerfer > > --- > > Changes in v2: > > fixed missing memblock include in fw/sni/sniprom.c > > tested on cobalt, IP22, IP28, IP30, IP32, JAZZ, SNI > > ... > > > diff --git a/arch/mips/kernel/prom.c

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Jiaxun Yang
在 2020/10/8 23:20, Serge Semin 写道: [...] - add_memory_region(LOONGSON_HIGHMEM_START, - highmemsize << 20, BOOT_MEM_RAM); - - add_memory_region(LOONGSON_PCI_MEM_END + 1, LOONGSON_HIGHMEM_START - - LOONGSON_PCI_MEM_EN

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Serge Semin
On Thu, Oct 08, 2020 at 05:56:17PM +0100, Maciej W. Rozycki wrote: > On Thu, 8 Oct 2020, Serge Semin wrote: > > > > > At least I don't see a decent reason to preserve them. The memory > > > > registration > > > > method does nearly the same sanity checks. The memory reservation > > > > function

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Serge Semin
On Thu, Oct 08, 2020 at 09:49:46AM -0700, Florian Fainelli wrote: > > > On 10/8/2020 8:54 AM, Serge Semin wrote: > > On Thu, Oct 08, 2020 at 04:30:35PM +0100, Maciej W. Rozycki wrote: > > > On Thu, 8 Oct 2020, Serge Semin wrote: > > > > > > > At least I don't see a decent reason to preserve them

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Maciej W. Rozycki
On Thu, 8 Oct 2020, Serge Semin wrote: > > > At least I don't see a decent reason to preserve them. The memory > > > registration > > > method does nearly the same sanity checks. The memory reservation function > > > defers a bit in adding the being reserved memory first. That seems > > > redund

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Florian Fainelli
On 10/8/2020 8:54 AM, Serge Semin wrote: On Thu, Oct 08, 2020 at 04:30:35PM +0100, Maciej W. Rozycki wrote: On Thu, 8 Oct 2020, Serge Semin wrote: At least I don't see a decent reason to preserve them. The memory registration method does nearly the same sanity checks. The memory reservation

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Serge Semin
On Thu, Oct 08, 2020 at 04:30:35PM +0100, Maciej W. Rozycki wrote: > On Thu, 8 Oct 2020, Serge Semin wrote: > > > At least I don't see a decent reason to preserve them. The memory > > registration > > method does nearly the same sanity checks. The memory reservation function > > defers a bit in a

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Maciej W. Rozycki
On Thu, 8 Oct 2020, Serge Semin wrote: > At least I don't see a decent reason to preserve them. The memory registration > method does nearly the same sanity checks. The memory reservation function > defers a bit in adding the being reserved memory first. That seems redundant, > since the reserved

Re: [PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Serge Semin
Hello Thomas On Thu, Oct 08, 2020 at 10:43:54AM +0200, Thomas Bogendoerfer wrote: > add_memory_region was the old interface for registering memory and > was already changed to used memblock internaly. Replace it by > directly calling memblock functions. Thanks for suggesting this cleanup. It's gr

[PATCH v2] MIPS: replace add_memory_region with memblock

2020-10-08 Thread Thomas Bogendoerfer
add_memory_region was the old interface for registering memory and was already changed to used memblock internaly. Replace it by directly calling memblock functions. Signed-off-by: Thomas Bogendoerfer --- Changes in v2: fixed missing memblock include in fw/sni/sniprom.c tested on