Skip to contentSkip to conversation

s390-make-setup_zero_pages-use-memblock.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 18, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: s390: make setup_zero_pages() use memblock
has been removed from the -mm tree. Its filename was
s390-make-setup_zero_pages-use-memblock.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Mike Rapoport (Microsoft)" <[email protected]>
Subject: s390: make setup_zero_pages() use memblock
Date: Thu, 13 Mar 2025 15:49:57 +0200

Allocating the zero pages from memblock is simpler because the memory is already reserved.

This will also help with pulling out memblock_free_all() to the generic code and reducing code duplication in arch::mem_init().

Cc Alexander Gordeev <[email protected]>
Cc Andreas Larsson <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Ard Biesheuvel <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Borislav Betkov <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Dave Hansen <[email protected]>
Cc David S. Miller <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Gerald Schaefer <[email protected]>
Cc Guo Ren (csky) <[email protected]>
Cc Helge Deller <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiaxun Yang <[email protected]>
Cc Johannes Berg <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Madhavan Srinivasan <[email protected]>
Cc Mark Brown <[email protected]>
Cc Matt Turner <[email protected]>
Cc Max Filippov <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Michal Simek <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Russel King <[email protected]>
Cc Stafford Horne <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Thomas Gleinxer <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Will Deacon <[email protected]>

---

 arch/s390/mm/init.c |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)
arch/s390/mm/init.c renamed from arch/s390/mm/init.c~s390-make-setup_zero_pages-use-memblock +3 -13
@@ -73,8 +73,6 @@ static void __init setup_zero_pages(void
 {
 	unsigned long total_pages = memblock_estimated_nr_free_pages();
 	unsigned int order;
-	struct page *page;
-	int i;
 
 	/* Latest machines require a mapping granularity of 512KB */
 	order = 7;
@@ -83,16 +81,7 @@ static void __init setup_zero_pages(void
 	while (order > 2 && (total_pages >> 10) < (1UL << order))
 		order--;
 
-	empty_zero_page = __get_free_pages(GFP_KERNEL | __GFP_ZERO, order);
-	if (!empty_zero_page)
-		panic("Out of memory in setup_zero_pages");
-
-	page = virt_to_page((void *) empty_zero_page);
-	split_page(page, order);
-	for (i = 1 << order; i > 0; i--) {
-		mark_page_reserved(page);
-		page++;
-	}
+	empty_zero_page = (unsigned long)memblock_alloc_or_panic(PAGE_SIZE << order, PAGE_SIZE);
 
 	zero_page_mask = ((PAGE_SIZE << order) - 1) & PAGE_MASK;
 }
@@ -176,9 +165,10 @@ void __init mem_init(void)
 	pv_init();
 	kfence_split_mapping();
 
+	setup_zero_pages();	/* Setup zeroed pages. */
+
 	/* this will put all low memory onto the freelists */
 	memblock_free_all();
-	setup_zero_pages();	/* Setup zeroed pages. */
 }
 
 unsigned long memory_block_size_bytes(void)

_

Patches currently in -mm which might be from [email protected] are

mm-mm_init-rename-__init_reserved_page_zone-to-__init_page_from_nid.patch mm-mm_init-rename-init_reserved_page-to-init_deferred_page.patch