The patch titled Subject: mm/sparse: use MEMBLOCK_ALLOC_ACCESSIBLE enum instead of 0 has been added to the -mm mm-unstable branch. Its filename is mm-sparse-use-memblock_alloc_accessible-enum-instead-of-0.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-sparse-use-memblock_alloc_accessible-enum-instead-of-0.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Leesoo Ahn <lsahn@xxxxxxxxxx> Subject: mm/sparse: use MEMBLOCK_ALLOC_ACCESSIBLE enum instead of 0 Date: Tue, 11 Jun 2024 00:15:28 +0900 Setting 'limit' variable to 0 might seem like it means "no limit". But in the memblock API, 0 actually means the 'MEMBLOCK_ALLOC_ACCESSIBLE' enum, which limits the physical address range end based on 'memblock.current_limit'. This could be confusing. Use the enum instead of 0 to make it clear. Link: https://lkml.kernel.org/r/20240610151528.943680-1-lsahn@xxxxxxxxxxxxxx Signed-off-by: Leesoo Ahn <lsahn@xxxxxxxxxx> Cc: Mike Rapoport (IBM) <rppt@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/sparse.c~mm-sparse-use-memblock_alloc_accessible-enum-instead-of-0 +++ a/mm/sparse.c @@ -351,7 +351,7 @@ sparse_early_usemaps_alloc_pgdat_section again: usage = memblock_alloc_try_nid(size, SMP_CACHE_BYTES, goal, limit, nid); if (!usage && limit) { - limit = 0; + limit = MEMBLOCK_ALLOC_ACCESSIBLE; goto again; } return usage; _ Patches currently in -mm which might be from lsahn@xxxxxxxxxx are mm-sparse-use-memblock_alloc_accessible-enum-instead-of-0.patch