The patch titled Subject: Re: mm: free_area_init: allow defining max_zone_pfn in descending order has been removed from the -mm tree. Its filename was mm-free_area_init-allow-defining-max_zone_pfn-in-descending-order-fix.patch This patch was dropped because it was folded into mm-free_area_init-allow-defining-max_zone_pfn-in-descending-order.patch ------------------------------------------------------ From: Mike Rapoport <rppt@xxxxxxxxxx> Subject: Re: mm: free_area_init: allow defining max_zone_pfn in descending order ARC fix Link: http://lkml.kernel.org/r/20200504153901.GM14260@xxxxxxxxxx Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx> Cc: Baoquan He <bhe@xxxxxxxxxx> Cc: Christian Borntraeger <borntraeger@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/arc/mm/init.c | 5 +++++ mm/page_alloc.c | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) --- a/arch/arc/mm/init.c~mm-free_area_init-allow-defining-max_zone_pfn-in-descending-order-fix +++ a/arch/arc/mm/init.c @@ -77,6 +77,11 @@ void __init early_init_dt_add_memory_arc base, TO_MB(size), !in_use ? "Not used":""); } +bool arch_has_descending_max_zone_pfns(void) +{ + return true; +} + /* * First memory setup routine called from setup_arch() * 1. setup swapper's mm @init_mm --- a/mm/page_alloc.c~mm-free_area_init-allow-defining-max_zone_pfn-in-descending-order-fix +++ a/mm/page_alloc.c @@ -7405,6 +7405,15 @@ static void check_for_memory(pg_data_t * } } +/* + * Some architecturs, e.g. ARC may have ZONE_HIGHMEM below ZONE_NORMAL. For + * such cases we allow max_zone_pfn sorted in the descending order + */ +bool __weak arch_has_descending_max_zone_pfns(void) +{ + return false; +} + /** * free_area_init - Initialise all pg_data_t and zone data * @max_zone_pfn: an array of max PFNs for each zone @@ -7422,7 +7431,7 @@ void __init free_area_init(unsigned long { unsigned long start_pfn, end_pfn; int i, nid, zone; - bool descending = false; + bool descending; /* Record where the zone boundaries are */ memset(arch_zone_lowest_possible_pfn, 0, @@ -7431,14 +7440,7 @@ void __init free_area_init(unsigned long sizeof(arch_zone_highest_possible_pfn)); start_pfn = find_min_pfn_with_active_regions(); - - /* - * Some architecturs, e.g. ARC may have ZONE_HIGHMEM below - * ZONE_NORMAL. For such cases we allow max_zone_pfn sorted in the - * descending order - */ - if (MAX_NR_ZONES > 1 && max_zone_pfn[0] > max_zone_pfn[1]) - descending = true; + descending = arch_has_descending_max_zone_pfns(); for (i = 0; i < MAX_NR_ZONES; i++) { if (descending) _ Patches currently in -mm which might be from rppt@xxxxxxxxxx are mm-free_area_init-allow-defining-max_zone_pfn-in-descending-order.patch xtensa-add-loglvl-to-show_trace-fix.patch