]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: kill find_min_pfn_with_active_regions()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Mon, 15 Aug 2022 11:10:17 +0000 (19:10 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Aug 2022 05:02:59 +0000 (22:02 -0700)
find_min_pfn_with_active_regions() is only called from free_area_init().
Open-code the PHYS_PFN(memblock_start_of_DRAM()) into free_area_init(),
and kill find_min_pfn_with_active_regions().

Link: https://lkml.kernel.org/r/20220815111017.39341-1-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/page_alloc.c

index b427de0a4dda7c5cd3658749c7620bdf264edf59..a664a75c893a01646adb5ebd5b7772d475e9370b 100644 (file)
@@ -2524,7 +2524,6 @@ extern unsigned long absent_pages_in_range(unsigned long start_pfn,
                                                unsigned long end_pfn);
 extern void get_pfn_range_for_nid(unsigned int nid,
                        unsigned long *start_pfn, unsigned long *end_pfn);
-extern unsigned long find_min_pfn_with_active_regions(void);
 
 #ifndef CONFIG_NUMA
 static inline int early_pfn_to_nid(unsigned long pfn)
index d85ee554c773747b2e449d1346bba4868b6e6fbf..db434a855a40a4a8d53f79f8ed3d0d6bcf6af023 100644 (file)
@@ -7950,17 +7950,6 @@ unsigned long __init node_map_pfn_alignment(void)
        return ~accl_mask + 1;
 }
 
-/**
- * find_min_pfn_with_active_regions - Find the minimum PFN registered
- *
- * Return: the minimum PFN based on information provided via
- * memblock_set_node().
- */
-unsigned long __init find_min_pfn_with_active_regions(void)
-{
-       return PHYS_PFN(memblock_start_of_DRAM());
-}
-
 /*
  * early_calculate_totalpages()
  * Sum pages in active regions for movable zone.
@@ -8253,7 +8242,7 @@ void __init free_area_init(unsigned long *max_zone_pfn)
        memset(arch_zone_highest_possible_pfn, 0,
                                sizeof(arch_zone_highest_possible_pfn));
 
-       start_pfn = find_min_pfn_with_active_regions();
+       start_pfn = PHYS_PFN(memblock_start_of_DRAM());
        descending = arch_has_descending_max_zone_pfns();
 
        for (i = 0; i < MAX_NR_ZONES; i++) {