arm64: mm: Drop pointless call to set_max_mapnr()
authorWill Deacon <will@kernel.org>
Wed, 29 Sep 2021 12:54:04 +0000 (13:54 +0100)
committerWill Deacon <will@kernel.org>
Wed, 29 Sep 2021 12:54:04 +0000 (13:54 +0100)
set_max_mapnr() is an empty stub function if CONFIG_NUMA=y, otherwise it
assigns to the 'max_mapnr' variable which is used to provide a generic
pfn_valid() implementation if CONFIG_MMU=n.

Since we don't support nommu on arm64, drop the pointless call to
set_max_mapnr() from mem_init().

Link: https://lore.kernel.org/r/130a50d7-92fd-31fa-261e-f73dadcb4fcf@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/mm/init.c

index 37a81754d9b61f7a47fa3b29f0fd4159fddf3608..14212574978334f30e048b432ff9c9e0c4ae0440 100644 (file)
@@ -416,8 +416,6 @@ void __init mem_init(void)
        else if (!xen_swiotlb_detect())
                swiotlb_force = SWIOTLB_NO_FORCE;
 
-       set_max_mapnr(max_pfn - PHYS_PFN_OFFSET);
-
        /* this will put all unused low memory onto the freelists */
        memblock_free_all();