[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181108175217.f55065d6115edbafd6aa3487@suse.de>
Date: Thu, 8 Nov 2018 17:52:17 +0100
From: Thomas Bogendoerfer <tbogendoerfer@...e.de>
To: Mike Rapoport <rppt@...ux.ibm.com>
Cc: Ralf Baechle <ralf@...ux-mips.org>,
Paul Burton <paul.burton@...s.com>,
James Hogan <jhogan@...nel.org>,
Huacai Chen <chenhc@...ote.com>, linux-mips@...ux-mips.org,
linux-kernel@...r.kernel.org, rppt@...ux.vnet.ibm.com
Subject: Re: [[PATCH]] mips: Fix switch to NO_BOOTMEM for SGI-IP27/loongons3
NUMA
On Thu, 8 Nov 2018 18:18:23 +0200
Mike Rapoport <rppt@...ux.ibm.com> wrote:
> On Thu, Nov 08, 2018 at 03:44:28PM +0100, Thomas Bogendoerfer wrote:
> > Commit bcec54bf3118 ("mips: switch to NO_BOOTMEM") broke SGI-IP27
> > and NUMA enabled loongson3 by doing memblock_set_current_limit()
> > before max_low_pfn has been evaluated. Both platforms need to do the
> > memblock_set_current_limit() in platform specific code. For
> > consistency the call to memblock_set_current_limit() is moved
> > to the common bootmem_init(), where max_low_pfn is calculated
> > for non NUMA enabled platforms.
> [..]
>
> As for SGI-IP27, the initialization of max_low_pfn as late as in
> paging_init() seems to be broken because it's value is used in
> arch_mem_init() and in finalize_initrd() anyway.
well, the patch is tested on real hardware and the first caller of
a memblock_alloc* function is in a function called by free_area_init_nodes().
> AFAIU, both platforms set max_low_pfn to last available pfn, so it seems we
> can simply do
>
> max_low_pfn = PFN_PHYS(memblock_end_of_DRAM())
>
> in the prom_meminit() function for both platforms and drop the loop
> evaluating max_low_pfn in paging_init().
sounds like a better plan. I'll prepare a new patch.
Thomas.
--
SUSE Linux GmbH
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Powered by blists - more mailing lists