]> git.hungrycats.org Git - linux/commitdiff
Merge tag 'memblock-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mm...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Oct 2026 03:27:19 +0000 (17:27 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Oct 2026 03:27:19 +0000 (17:27 -1000)
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()

1  2 
Documentation/admin-guide/kernel-parameters.txt
mm/memblock.c
mm/mm_init.c
mm/mm_init.h
mm/sparse-vmemmap.c
mm/sparse.c
tools/include/linux/mm.h

diff --cc mm/memblock.c
Simple merge
diff --cc mm/mm_init.c
Simple merge
diff --cc mm/mm_init.h
index 393006c1c6efefd1992a082567ff823f7f791ffd,3207ae33957b7774a3d08455a0af4f866f3c3d64..0034e37dbabd662e33bb915fa51183d29b05847c
@@@ -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,
Simple merge
diff --cc mm/sparse.c
index b75921c622edef67b1b008a0397cbac64f69924a,117bc93f55d011f8a764277396e7fc96b935b626..36692b1dd733305d5fa339928aa116638253f092
@@@ -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 */
  
index d586a510e6e18b94c83f5617114bdfde279f43b5,480526de8d65d151a523c7dffe4b26394047bfc6..bce7616cd7c4d33d38906cd3c605c87b91ee6448
@@@ -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)
  {
  }