Re: [PATCH] mm: make arch_has_descending_max_zone_pfns() static

From: Arnd Bergmann
Date: Sat Apr 15 2023 - 04:09:42 EST


On Sat, Apr 15, 2023, at 08:42, kernel test robot wrote:
> Hello,
>
> kernel test robot noticed "kernel_BUG_at_lib/list_debug.c" on:
>
> commit: c31fe5eb2ec68f6d2331fabc924e0030cc6bb2b3 ("[PATCH] mm: make
> arch_has_descending_max_zone_pfns() static")

Thanks for the report, that was a logic error on my end, the fix is:

--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -1756,7 +1756,7 @@ static void __init free_area_init_memoryless_node(int nid)
*/
static bool arch_has_descending_max_zone_pfns(void)
{
- return !IS_ENABLED(CONFIG_ARC_HAS_PAE40);
+ return IS_ENABLED(CONFIG_ARC) && !IS_ENABLED(CONFIG_ARC_HAS_PAE40);
}

/**

I'll send a replacement v2 that has this folded in.

Arnd