Skip to contentSkip to conversation

arm-mem_init-use-memblock_phys_free-to-free-dma-memory-on-sa1111.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: arm: mem_init: use memblock_phys_free() to free DMA memory on SA1111
has been removed from the -mm tree. Its filename was
arm-mem_init-use-memblock_phys_free-to-free-dma-memory-on-sa1111.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: arm: mem_init: use memblock_phys_free() to free DMA memory on SA1111
Date: Thu, 13 Mar 2025 15:49:51 +0200

Patch series "arch, mm: reduce code duplication in mem_init()", v2.

Every architecture has implementation of mem_init() function and some even more than one. All these release free memory to the buddy allocator, most of them set high_memory to the end of directly addressable memory and many of them set max_mapnr for FLATMEM case.

These patches pull the commonalities into the generic code and refactor some of the mem_init() implementations so that many of them can be just dropped.

This patch (of 13):

This will help to pull out memblock_free_all() to generic code.

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 <[email protected]>
Cc Heiko Carstens <[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 Matt Turner <[email protected]>
Cc Max Filippov <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Michal Simek <[email protected]>
Cc "Mike Rapoport (IBM)" <[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/arm/mm/init.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/mm/init.c renamed from arch/arm/mm/init.c~arm-mem_init-use-memblock_phys_free-to-free-dma-memory-on-sa1111 +4 -4
@@ -277,14 +277,14 @@ void __init mem_init(void)
 
 	set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
 
-	/* this will put all unused low memory onto the freelists */
-	memblock_free_all();
-
 #ifdef CONFIG_SA1111
 	/* now that our DMA memory is actually so designated, we can free it */
-	free_reserved_area(__va(PHYS_OFFSET), swapper_pg_dir, -1, NULL);
+	memblock_phys_free(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET);
 #endif
 
+	/* this will put all unused low memory onto the freelists */
+	memblock_free_all();
+
 	free_highpages();
 
 	/*

_

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