linux-next: manual merge of the liveupdate tree with the mm-unstable tree
Mark Brown <[email protected]> Tue, 28 Jul 2026 17:27:05 +0100
| Newsgroups | org.kernel.vger.linux-next,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
--y/ip9ol29UpFPYmh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi all,
Today's linux-next merge of the liveupdate tree got a conflict in:
mm/hugetlb.c
mm/mm_init.c
between at least commit:
7b558c2570017 ("mm/hugetlb: refactor early boot gigantic hugepage allocat=
ion")
=66rom the mm-unstable tree and commit:
7c967e2d549dc ("memblock: make HugeTLB bootmem allocation work with KHO")
f476132a8999e ("mm/mm_init: don't rely on memblock to get KHO scratch mig=
ratetype")
=66rom the liveupdate tree.
I stared at the conflict for a bit but with my minimal familiarity with
this code I have absolutely no confidence in my ability to do a working
resolution for this in a timely fashion so instead I merged the version
of liveupdate from next-20260727, I'll have another look tomorrow but
would really appreciate it if someone could help out here.
diff --cc mm/hugetlb.c
index a77c3c1cb8943,ab4afc818e8cb..0000000000000
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@@ -3076,23 -3027,51 +3076,60 @@@ out_end_reservation
=20
static __init void *alloc_bootmem(struct hstate *h, int nid, bool node_ex=
act)
{
- struct huge_bootmem_page *m;
- int listnode =3D nid;
-
if (hugetlb_early_cma(h))
++<<<<<<< HEAD
+ return hugetlb_cma_alloc_bootmem(h, nid, node_exact);
+
+ if (node_exact)
+ return memblock_alloc_exact_nid_raw(huge_page_size(h),
+ huge_page_size(h), 0,
+ MEMBLOCK_ALLOC_ACCESSIBLE, nid);
+
+ return memblock_alloc_try_nid_raw(huge_page_size(h),
+ huge_page_size(h), 0,
+ MEMBLOCK_ALLOC_ACCESSIBLE, nid);
++=3D=3D=3D=3D=3D=3D=3D
+ m =3D hugetlb_cma_alloc_bootmem(h, &listnode, node_exact);
+ else {
+ m =3D memblock_alloc_hugetlb(huge_page_size(h), nid, node_exact);
+ if (m) {
+ m->flags =3D 0;
+ m->cma =3D NULL;
+=20
+ /*
+ * For pre-HVO to work correctly, pages need to be on
+ * the list for the node they were actually allocated
+ * from. That node may be different in the case of
+ * fallback by memblock_alloc_hugetlb_bootmem. So,
+ * extract the actual node first.
+ */
+ if (!node_exact)
+ listnode =3D early_pfn_to_nid(PHYS_PFN(__pa(m)));
+ }
+ }
+=20
+ if (m) {
+ /*
+ * Use the beginning of the huge page to store the
+ * huge_bootmem_page struct (until gather_bootmem
+ * puts them into the mem_map).
+ *
+ * Put them into a private list first because mem_map
+ * is not up yet.
+ */
+ INIT_LIST_HEAD(&m->list);
+ list_add(&m->list, &huge_boot_pages[listnode]);
+ m->hstate =3D h;
+ }
+=20
+ return m;
++>>>>>>> liveupdate/next
}
=20
-int alloc_bootmem_huge_page(struct hstate *h, int nid)
+void *__init arch_alloc_bootmem_huge_page(struct hstate *h, int nid)
__attribute__ ((weak, alias("__alloc_bootmem_huge_page")));
-int __alloc_bootmem_huge_page(struct hstate *h, int nid)
+void *__init __alloc_bootmem_huge_page(struct hstate *h, int nid)
{
- struct huge_bootmem_page *m =3D NULL; /* initialize for clang */
int nr_nodes, node =3D nid;
=20
/* do node specific alloc */
diff --cc mm/mm_init.c
index 18befe5759310,dc20d6814e48b..0000000000000
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@@ -685,7 -681,9 +685,13 @@@ static __meminit void pageblock_migrate
const unsigned long end =3D pfn + nr_pages;
=20
for (pfn =3D pageblock_align(pfn); pfn < end; pfn +=3D pageblock_nr_page=
s) {
++<<<<<<< HEAD
+ init_pageblock_migratetype(pfn_to_page(pfn), migratetype, false);
++=3D=3D=3D=3D=3D=3D=3D
+ enum migratetype mt =3D kho_scratch_migratetype(pfn, migratetype);
+=20
+ init_pageblock_migratetype(pfn_to_page(pfn), mt, false);
++>>>>>>> liveupdate/next
if (!atomic && IS_ALIGNED(pfn, PAGES_PER_SECTION))
cond_resched();
}
@@@ -1978,7 -1982,7 +1983,11 @@@ static void __init deferred_free_pages(
if (!nr_pages)
return;
=20
++<<<<<<< HEAD
+ pageblock_migratetype_init_range(pfn, nr_pages, mt, true);
++=3D=3D=3D=3D=3D=3D=3D
+ pageblock_migratetype_init_range(pfn, nr_pages, MIGRATE_MOVABLE, true);
++>>>>>>> liveupdate/next
=20
page =3D pfn_to_page(pfn);
=20
@@@ -2682,8 -2683,7 +2689,12 @@@ void __init __weak mem_init(void
=20
void __init mm_core_init_early(void)
{
++<<<<<<< HEAD
+ free_area_init();
+
++=3D=3D=3D=3D=3D=3D=3D
+ kho_memory_init_early();
++>>>>>>> liveupdate/next
hugetlb_cma_reserve();
hugetlb_bootmem_alloc();
--y/ip9ol29UpFPYmh
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmpo2FkACgkQJNaLcl1U
h9BsFQgAgsyqkUVsiampkZyRQvNRTSe3sXF5A6nJczmkMHFhHFHGGuQznnA2JR+5
Rq+ip5CRQ/rs0aw9BC/UEVV1WmQLFrgJU366izBuOptZcsdkfdGrGyLZ44BU1+0/
dR/8EWmKbWKiJnkAea5Y2JJuoVZ5EnOyUmxEuy4I/R/7xL1IY492JWky5G13Mqv+
3ttAa5Ga+9jsEqJ4ZY4xCqhNXa9w06pWiIjlwN1jsCrGw5AYvEQqb9OOnPjnPp5B
cGJS5LDnNBYMMcTz9sUoGzF6qf3X95dyx5c348uwOilINNJMYbp8Z1mZ1xjW+9Tr
Lnr/bRpp1k7Nf/hTJk6+0f6tSJHZHQ==
=Lav/
-----END PGP SIGNATURE-----
--y/ip9ol29UpFPYmh--