Re: [PATCH v2 06/17] mm/mm_init: factor out pfn_to_zone()

From: Muchun Song

Date: Mon Jul 20 2026 - 07:12:59 EST




> On Jul 20, 2026, at 17:31, Muchun Song <songmuchun@xxxxxxxxxxxxx> wrote:
>
> pfn_to_zone() in hugetlb_vmemmap.c duplicates the zone lookup logic in
> __init_deferred_page().
>
> Move it to mm_init.c, declare it in mm/internal.h, and reuse it from
> __init_deferred_page() and HugeTLB early vmemmap initialization instead
> of open-coding the zone walk there.

Sashiko said "the declaration is actually in mm/mm_init.h". That is indeed
an issue. When I was handling the rebase, I forgot to update the commit
message here due to code conflicts. I will fix this in the next version.

Thanks.