Commit 394023fbe34f for kernel
commit 394023fbe34fccec5d4db2576169d21e14c8d3d4
Merge: 390febb5805d 7933ad3f6696
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Oct 25 17:27:19 2026 -1000
Merge tag 'memblock-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/memblock
Pull memblock updates from Mike Rapoport:
"Performance improvement:
- Use binary search in memblock_add_range() and
memblock_isolate_range()
Cleanups:
- Several simplifications in memblock and mm_init that remove
redundant code
- After rework of sparsemem buffer preallocation, memmap_alloc() does
not require exact_nid parameter. Remove that parameter, drop now
unused memblock_alloc_exact_nid_raw() and adjust memblock tests
accordingly
memblock test updates:
- add coverage for lowmem allocations
- fix 32-bit build warnings"
* tag 'memblock-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/memblock:
memblock: use binary search to locate candidate regions
memblock: drop for_each_memblock_type() and open code its users
memblock: Remove unused memblock_alloc_exact_nid_raw()
memblock tests: Move exact nid tests to memblock_alloc_range_nid()
mm: Remove unused exact_nid parameter from memmap_alloc()
memblock: initialize the region merge end index
tools: use __pa() in virt_to_phys()
memblock tests: zero-extend simulated memory addresses
memblock tests: use physical addresses for region removal
memblock: reject non-page-aligned reserve_mem regions
memblock tests: cover allocations below the low address limit
memblock tests: model the low allocation limit within dummy memory
mm/mm_init: remove zone_absent_pages_in_node()
memblock: remove conditional return with no effect
memblock: simplify reset_all_zones_managed_pages()
diff --cc mm/mm_init.h
index 393006c1c6ef,3207ae33957b..0034e37dbabd
--- a/mm/mm_init.h
+++ b/mm/mm_init.h
@@@ -23,10 -23,16 +23,10 @@@ DECLARE_STATIC_KEY_MAYBE(CONFIG_DEBUG_V
bool pfn_range_intersects_zones(int nid, unsigned long start_pfn,
unsigned long nr_pages);
-static inline void clear_zone_contiguous(struct zone *zone)
-{
- zone->contiguous = false;
-}
-
void memblock_free_pages(unsigned long pfn, unsigned int order);
- void *memmap_alloc(phys_addr_t size, phys_addr_t align, phys_addr_t min_addr,
- int nid, bool exact_nid);
+ void *memmap_alloc(phys_addr_t size, phys_addr_t align,
+ phys_addr_t min_addr, int nid);
void memmap_init_range(unsigned long size, int nid, unsigned long zone,
unsigned long start_pfn, unsigned long zone_end_pfn,
diff --cc mm/sparse.c
index b75921c622ed,117bc93f55d0..36692b1dd733
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@@ -213,9 -229,9 +213,9 @@@ struct page __init *__populate_section_
unsigned long nr_pages, int nid, struct vmem_altmap *altmap,
struct dev_pagemap *pgmap)
{
- unsigned long size = section_map_size();
+ const unsigned long size = PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION);
- return memmap_alloc(size, size, __pa(MAX_DMA_ADDRESS), nid, false);
+ return memmap_alloc(size, size, __pa(MAX_DMA_ADDRESS), nid);
}
#endif /* !CONFIG_SPARSEMEM_VMEMMAP */
diff --cc tools/include/linux/mm.h
index d586a510e6e1,480526de8d65..bce7616cd7c4
--- a/tools/include/linux/mm.h
+++ b/tools/include/linux/mm.h
@@@ -30,9 -30,13 +30,9 @@@ static inline void *phys_to_virt(unsign
#define virt_to_phys virt_to_phys
static inline phys_addr_t virt_to_phys(volatile void *address)
{
- return (phys_addr_t)address;
+ return __pa(address);
}
-static inline void totalram_pages_inc(void)
-{
-}
-
static inline void totalram_pages_add(long count)
{
}