Re: [PATCH] memblock: move reserve_bootmem_range() to memblock.c and make it static

From: Andrew Morton

Date: Sun Mar 22 2026 - 12:38:07 EST


On Sun, 22 Mar 2026 16:31:44 +0200 Mike Rapoport <rppt@xxxxxxxxxx> wrote:

> reserve_bootmem_range() is only called from memmap_init_reserved_pages()
> and it was in mm/mm_init.c because of its dependecies on static
> init_deferred_pages().
>
> Since init_deferred_pages() is not static anymore, move
> reserve_bootmem_range(), rename it to memmap_init_reserved_range() and
> make it static.
>
> Update the comment describing it to better reflect what the function
> does and drop bogus comment about reserved pages in free_bootmem_page().
>
> Update memblock test stubs to reflect the core changes.

Some minor observations from Sashiko:
https://sashiko.dev/#/patchset/20260322143144.3540679-1-rppt@xxxxxxxxxx