[PATCH 10/49] mm: move subsection_map_init() into sparse_init()
Muchun Song
muchun.song at linux.dev
Wed Apr 29 13:06:15 AEST 2026
> On Apr 28, 2026, at 15:06, Mike Rapoport <rppt at kernel.org> wrote:
>
> On Sun, Apr 05, 2026 at 08:52:01PM +0800, Muchun Song wrote:
>> Move the initialization of the subsection map from free_area_init()
>> into sparse_init(). This encapsulates the logic within the sparse
>> memory initialization code.
>>
>> Signed-off-by: Muchun Song <songmuchun at bytedance.com>
>
> Acked-by: Mike Rapoport (Microsoft) <rppt at kernel.org>
Thanks.
>
>> ---
>> mm/internal.h | 5 ++---
>> mm/mm_init.c | 10 ++--------
>> mm/sparse-vmemmap.c | 11 ++++++++++-
>> mm/sparse.c | 1 +
>> 4 files changed, 15 insertions(+), 12 deletions(-)
>>
>> diff --git a/mm/internal.h b/mm/internal.h
>> index edb1c04d0617..d70075d0e788 100644
>> --- a/mm/internal.h
>> +++ b/mm/internal.h
>> @@ -1004,10 +1004,9 @@ static inline void sparse_init(void) {}
>> * mm/sparse-vmemmap.c
>> */
>> #ifdef CONFIG_SPARSEMEM_VMEMMAP
>> -void sparse_init_subsection_map(unsigned long pfn, unsigned long nr_pages);
>> +void sparse_init_subsection_map(void);
>> #else
>> -static inline void sparse_init_subsection_map(unsigned long pfn,
>> - unsigned long nr_pages)
>> +static inline void sparse_init_subsection_map(void)
>> {
>> }
>> #endif /* CONFIG_SPARSEMEM_VMEMMAP */
>
> I side note: we might want to split out mm/sparse.h and also move some
> declarations from include/linux/mmzone.h there.
I think we can do that in a separate series for cleanup only.
Thanks.
More information about the Linuxppc-dev
mailing list