Re: [PATCH v2 08/13] mm/sparse: move __highest_used_section_nr handling
From: Oscar Salvador (SUSE)
Date: Tue Sep 22 2026 - 00:25:17 EST
On Mon, Sep 21, 2026 at 09:59:00PM +0200, David Hildenbrand (Arm) wrote:
> In preparation for removing __section_mark_present(), let's move
> __highest_used_section_nr handling into its callers. Verify in
> sparse_init_one_section() that it was properly updated.
>
> In sparse_sections_init() we can just set it to the last processed
> section_nr.
>
> No functional change intended.
>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Acked-by: Oscar Salvador <osalvador@xxxxxxx>
> ---
...
> --- a/mm/sparse.h
> +++ b/mm/sparse.h
> @@ -26,6 +26,7 @@ static inline void sparse_init_one_section(struct mem_section *ms,
> unsigned long coded_mem_map;
>
> BUILD_BUG_ON(SECTION_MAP_LAST_BIT > PFN_SECTION_SHIFT);
> + VM_WARN_ON_ONCE(section_nr > __highest_used_section_nr);
I wonder, have we seen this in the wild?
--
Oscar Salvador
SUSE Labs