On Sat, Mar 24, 2018 at 1:24 PM, Jia He <hejianet@xxxxxxxxx> wrote:Ok, thanks for your suggestions.
Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfnsIt is not dependent on CONFIG_HAVE_ARCH_PFN_VALID option but on
where possible") optimized the loop in memmap_init_zone(). But it causes
possible panic bug. So Daniel Vacek reverted it later.
But memblock_next_valid_pfn is valid when CONFIG_HAVE_ARCH_PFN_VALID is
enabled. And as verified by Eugeniu Rosca, arm can benifit from this
commit. So remain the memblock_next_valid_pfn.
arm(64) implementation of pfn_valid() function, IIUC. So it should
really be moved from generic source file to arm specific location. I'd
say somewhere close to the pfn_valid() implementation. Such as to
arch/arm{,64}/mm/ init.c-ish?
--nX