linux/arch/powerpc
Muchun Song 27ca02e689 mm/hugetlb: refactor early boot gigantic hugepage allocation
The early boot gigantic hugepage allocation helpers currently mix
allocation with huge_bootmem_page setup, and leave part of the
initialization flow in architecture code.

Refactor the interface to return the allocated huge page pointer and move
the huge_bootmem_page setup into the generic hugetlb code.  This makes the
architecture-specific paths focus only on finding memory, while the common
code handles node placement and early page metadata setup in one place.

This also lets powerpc benefit from memblock_reserved_mark_noinit(), which
it did not enable before.

In addition, upcoming cross-zone validation for boot-time gigantic hugetlb
reservation is common logic.  With this refactoring, that logic can stay
in the generic code instead of being duplicated in architecture-specific
paths.

Link: https://lore.kernel.org/20260612035903.2468601-14-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Oscar Salvador (SUSE) <osalvador@suse.de>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Frank van der Linden <fvdl@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oscar Salvador (SUSE) <osalvador@kernel.org>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Usama Arif <usama.arif@linux.dev>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
History 2026-07-28 21:11:59 -07:00
..
boot strncpy removal for v7.2-rc1 2026-06-19 14:56:45 -07:00
configs Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
crypto crypto: powerpc/aes - use min in ppc_{ecb,cbc,ctr,xts}_crypt 2026-06-05 19:36:36 +08:00
include powerpc: Remove dead non-preemption code 2026-07-15 08:04:13 +05:30
kernel powerpc/dt_cpu_ftrs: Set CPU_FTR_P11_PVR for Power11 and later processors 2026-07-15 08:04:13 +05:30
kexec powerpc/kexec: fix double get_cpu() imbalance in kexec_prepare_cpus 2026-06-15 16:25:21 +05:30
kvm KVM: PPC: remove hugetlb.h inclusion 2026-04-05 13:53:23 -07:00
lib powerpc: Remove dead non-preemption code 2026-07-15 08:04:13 +05:30
math-emu powerpc/math-emu: Inhibit W=1 warnings 2022-09-08 11:11:18 +10:00
mm mm/hugetlb: refactor early boot gigantic hugepage allocation 2026-07-28 21:11:59 -07:00
net bpf: Restrict JIT predictor flush to cBPF 2026-07-01 10:33:38 +02:00
perf powerpc/perf: fix preempt count underflow in fsl_emb_pmu_del 2026-06-15 16:25:21 +05:30
platforms powerpc/pseries: fix memory leak on krealloc failure in papr_init 2026-07-15 08:04:13 +05:30
purgatory Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
sysdev Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
tools powerpc64/ftrace: fix OOL stub count with clang 2026-03-07 16:02:25 +05:30
xmon powerpc/xmon: replace sizeof calculations with ARRAY_SIZE macro 2025-09-01 13:40:46 +05:30
Kbuild powerpc64/ftrace: Move ftrace sequence out of line 2024-10-31 11:00:54 +11:00
Kconfig powerpc updates for 7.2 2026-06-19 07:37:52 -07:00
Kconfig.debug powerpc: fix dead default for GUEST_STATE_BUFFER_TEST 2026-05-12 11:50:52 +05:30
Makefile kbuild: Add missing $(objtree) prefix to powerpc crtsavres.o artifact 2025-09-01 13:41:57 +05:30
Makefile.postlink powerpc/ftrace: Add a postlink script to validate function tracer 2024-10-31 11:00:54 +11:00