Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'fixes-2025-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock

Pull memblock fixes from Mike Rapoport:

- printk cleanups in memblock and numa_memblks

- update kernel-doc for MEMBLOCK_RSRV_NOINIT to be more accurate and
detailed

* tag 'fixes-2025-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
memblock: fix kernel-doc for MEMBLOCK_RSRV_NOINIT
mm: numa,memblock: Use SZ_1M macro to denote bytes to MB conversion
mm/numa_memblks: Use pr_debug instead of printk(KERN_DEBUG)

+21 -13
+3 -2
include/linux/memblock.h
··· 40 40 * via a driver, and never indicated in the firmware-provided memory map as 41 41 * system RAM. This corresponds to IORESOURCE_SYSRAM_DRIVER_MANAGED in the 42 42 * kernel resource tree. 43 - * @MEMBLOCK_RSRV_NOINIT: memory region for which struct pages are 44 - * not initialized (only for reserved regions). 43 + * @MEMBLOCK_RSRV_NOINIT: reserved memory region for which struct pages are not 44 + * fully initialized. Users of this flag are responsible to properly initialize 45 + * struct pages of this region 45 46 * @MEMBLOCK_RSRV_KERN: memory region that is reserved for kernel use, 46 47 * either explictitly with memblock_reserve_kern() or via memblock 47 48 * allocation APIs. All memblock allocations set this flag.
+13 -6
mm/memblock.c
··· 780 780 } 781 781 782 782 if ((nr_pages << PAGE_SHIFT) > threshold_bytes) { 783 - mem_size_mb = memblock_phys_mem_size() >> 20; 783 + mem_size_mb = memblock_phys_mem_size() / SZ_1M; 784 784 pr_err("NUMA: no nodes coverage for %luMB of %luMB RAM\n", 785 - (nr_pages << PAGE_SHIFT) >> 20, mem_size_mb); 785 + (nr_pages << PAGE_SHIFT) / SZ_1M, mem_size_mb); 786 786 return false; 787 787 } 788 788 ··· 1091 1091 1092 1092 /** 1093 1093 * memblock_reserved_mark_noinit - Mark a reserved memory region with flag 1094 - * MEMBLOCK_RSRV_NOINIT which results in the struct pages not being initialized 1095 - * for this region. 1094 + * MEMBLOCK_RSRV_NOINIT 1095 + * 1096 1096 * @base: the base phys addr of the region 1097 1097 * @size: the size of the region 1098 1098 * 1099 - * struct pages will not be initialized for reserved memory regions marked with 1100 - * %MEMBLOCK_RSRV_NOINIT. 1099 + * The struct pages for the reserved regions marked %MEMBLOCK_RSRV_NOINIT will 1100 + * not be fully initialized to allow the caller optimize their initialization. 1101 + * 1102 + * When %CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, setting this flag 1103 + * completely bypasses the initialization of struct pages for such region. 1104 + * 1105 + * When %CONFIG_DEFERRED_STRUCT_PAGE_INIT is disabled, struct pages in this 1106 + * region will be initialized with default values but won't be marked as 1107 + * reserved. 1101 1108 * 1102 1109 * Return: 0 on success, -errno on failure. 1103 1110 */
+2 -2
mm/numa_emulation.c
··· 73 73 } 74 74 75 75 printk(KERN_INFO "Faking node %d at [mem %#018Lx-%#018Lx] (%LuMB)\n", 76 - nid, eb->start, eb->end - 1, (eb->end - eb->start) >> 20); 76 + nid, eb->start, eb->end - 1, (eb->end - eb->start) / SZ_1M); 77 77 return 0; 78 78 } 79 79 ··· 264 264 min_size = ALIGN(max(min_size, FAKE_NODE_MIN_SIZE), FAKE_NODE_MIN_SIZE); 265 265 if (size < min_size) { 266 266 pr_err("Fake node size %LuMB too small, increasing to %LuMB\n", 267 - size >> 20, min_size >> 20); 267 + size / SZ_1M, min_size / SZ_1M); 268 268 size = min_size; 269 269 } 270 270 size = ALIGN_DOWN(size, FAKE_NODE_MIN_SIZE);
+3 -3
mm/numa_memblks.c
··· 76 76 for (j = 0; j < cnt; j++) 77 77 numa_distance[i * cnt + j] = i == j ? 78 78 LOCAL_DISTANCE : REMOTE_DISTANCE; 79 - printk(KERN_DEBUG "NUMA: Initialized distance table, cnt=%d\n", cnt); 79 + pr_debug("NUMA: Initialized distance table, cnt=%d\n", cnt); 80 80 81 81 return 0; 82 82 } ··· 427 427 unsigned long pfn_align = node_map_pfn_alignment(); 428 428 429 429 if (pfn_align && pfn_align < PAGES_PER_SECTION) { 430 - unsigned long node_align_mb = PFN_PHYS(pfn_align) >> 20; 430 + unsigned long node_align_mb = PFN_PHYS(pfn_align) / SZ_1M; 431 431 432 - unsigned long sect_align_mb = PFN_PHYS(PAGES_PER_SECTION) >> 20; 432 + unsigned long sect_align_mb = PFN_PHYS(PAGES_PER_SECTION) / SZ_1M; 433 433 434 434 pr_warn("Node alignment %luMB < min %luMB, rejecting NUMA config\n", 435 435 node_align_mb, sect_align_mb);