This series fixes pfn_valid() for ZONE_DEVICE based memory and also improves its performance for normal hotplug memory. While here, it also reorganizes pfn_valid() on CONFIG_SPARSEMEM. This series is based on v5.12-rc1.
Cc: Catalin Marinas <catalin.mari...@arm.com> Cc: Will Deacon <w...@kernel.org> Cc: Ard Biesheuvel <a...@kernel.org> Cc: Mark Rutland <mark.rutl...@arm.com> Cc: James Morse <james.mo...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com> Cc: Jérôme Glisse <jgli...@redhat.com> Cc: Dan Williams <dan.j.willi...@intel.com> Cc: David Hildenbrand <da...@redhat.com> Cc: Mike Rapoport <r...@linux.ibm.com> Cc: Veronika Kabatova <vkaba...@redhat.com> Cc: linux-arm-ker...@lists.infradead.org Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Changes in V3: - Validate the pfn before fetching mem_section with __pfn_to_section() in [PATCH 2/2] Changes in V2: https://lore.kernel.org/linux-mm/1612239114-28428-1-git-send-email-anshuman.khand...@arm.com/ - Dropped pfn_valid() bifurcation based on CONFIG_SPARSEMEM - Used PFN_PHYS() and PHYS_PFN() instead of __pfn_to_phys() and __phys_to_pfn() - Moved __pfn_to_section() inside #ifdef CONFIG_SPARSEMEM with a { } construct Changes in V1: https://lore.kernel.org/linux-mm/1611905986-20155-1-git-send-email-anshuman.khand...@arm.com/ - Test pfn_section_valid() for non boot memory Changes in RFC: https://lore.kernel.org/linux-arm-kernel/1608621144-4001-1-git-send-email-anshuman.khand...@arm.com/ Anshuman Khandual (2): arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory arm64/mm: Reorganize pfn_valid() arch/arm64/mm/init.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) -- 2.20.1