sparse.c (0ea8a56de21be24cb79abb03dee79aabcd60a316) | sparse.c (c9118e6c37bff9ade90b638207a6e0db676ee6a9) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * sparse memory mappings. 4 */ 5#include <linux/mm.h> 6#include <linux/slab.h> 7#include <linux/mmzone.h> 8#include <linux/memblock.h> --- 277 unchanged lines hidden (view full) --- 286 287/* 288 * Mark all memblocks as present using memory_present(). 289 * This is a convenience function that is useful to mark all of the systems 290 * memory as present during initialization. 291 */ 292static void __init memblocks_present(void) 293{ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * sparse memory mappings. 4 */ 5#include <linux/mm.h> 6#include <linux/slab.h> 7#include <linux/mmzone.h> 8#include <linux/memblock.h> --- 277 unchanged lines hidden (view full) --- 286 287/* 288 * Mark all memblocks as present using memory_present(). 289 * This is a convenience function that is useful to mark all of the systems 290 * memory as present during initialization. 291 */ 292static void __init memblocks_present(void) 293{ |
294 struct memblock_region *reg; | 294 unsigned long start, end; 295 int i, nid; |
295 | 296 |
296 for_each_memblock(memory, reg) { 297 memory_present(memblock_get_region_node(reg), 298 memblock_region_memory_base_pfn(reg), 299 memblock_region_memory_end_pfn(reg)); 300 } | 297 for_each_mem_pfn_range(i, MAX_NUMNODES, &start, &end, &nid) 298 memory_present(nid, start, end); |
301} 302 303/* 304 * Subtle, we encode the real pfn into the mem_map such that 305 * the identity pfn - section_mem_map will return the actual 306 * physical page frame number. 307 */ 308static unsigned long sparse_encode_mem_map(struct page *mem_map, unsigned long pnum) --- 665 unchanged lines hidden --- | 299} 300 301/* 302 * Subtle, we encode the real pfn into the mem_map such that 303 * the identity pfn - section_mem_map will return the actual 304 * physical page frame number. 305 */ 306static unsigned long sparse_encode_mem_map(struct page *mem_map, unsigned long pnum) --- 665 unchanged lines hidden --- |