/linux-6.12.1/mm/ |
D | mm_init.c | 301 unsigned long start_pfn, end_pfn; in early_calculate_totalpages() local 304 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, &nid) { in early_calculate_totalpages() 305 unsigned long pages = end_pfn - start_pfn; in early_calculate_totalpages() 463 unsigned long start_pfn, end_pfn; in find_zone_movable_pfns_for_nodes() local 481 for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) { in find_zone_movable_pfns_for_nodes() 484 start_pfn = max(start_pfn, zone_movable_pfn[nid]); in find_zone_movable_pfns_for_nodes() 485 if (start_pfn >= end_pfn) in find_zone_movable_pfns_for_nodes() 489 if (start_pfn < usable_startpfn) { in find_zone_movable_pfns_for_nodes() 492 - start_pfn; in find_zone_movable_pfns_for_nodes() 511 start_pfn = usable_startpfn; in find_zone_movable_pfns_for_nodes() [all …]
|
D | page_isolation.c | 33 static struct page *has_unmovable_pages(unsigned long start_pfn, unsigned long end_pfn, in has_unmovable_pages() argument 36 struct page *page = pfn_to_page(start_pfn); in has_unmovable_pages() 40 VM_BUG_ON(pageblock_start_pfn(start_pfn) != in has_unmovable_pages() 55 for (pfn = start_pfn; pfn < end_pfn; pfn++) { in has_unmovable_pages() 148 unsigned long start_pfn, unsigned long end_pfn) in set_migratetype_isolate() argument 177 check_unmovable_start = max(page_to_pfn(page), start_pfn); in set_migratetype_isolate() 312 unsigned long start_pfn; in isolate_single_pageblock() local 332 start_pfn = max(ALIGN_DOWN(isolate_pageblock, MAX_ORDER_NR_PAGES), in isolate_single_pageblock() 367 for (pfn = start_pfn; pfn < boundary_pfn;) { in isolate_single_pageblock() 480 int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, in start_isolate_page_range() argument [all …]
|
D | memory_hotplug.c | 415 unsigned long start_pfn, in find_smallest_section_pfn() argument 418 for (; start_pfn < end_pfn; start_pfn += PAGES_PER_SUBSECTION) { in find_smallest_section_pfn() 419 if (unlikely(!pfn_to_online_page(start_pfn))) in find_smallest_section_pfn() 422 if (unlikely(pfn_to_nid(start_pfn) != nid)) in find_smallest_section_pfn() 425 if (zone != page_zone(pfn_to_page(start_pfn))) in find_smallest_section_pfn() 428 return start_pfn; in find_smallest_section_pfn() 436 unsigned long start_pfn, in find_biggest_section_pfn() argument 443 for (; pfn >= start_pfn; pfn -= PAGES_PER_SUBSECTION) { in find_biggest_section_pfn() 459 static void shrink_zone_span(struct zone *zone, unsigned long start_pfn, in shrink_zone_span() argument 465 if (zone->zone_start_pfn == start_pfn) { in shrink_zone_span() [all …]
|
D | page_ext.c | 371 static int __meminit online_page_ext(unsigned long start_pfn, in online_page_ext() argument 378 start = SECTION_ALIGN_DOWN(start_pfn); in online_page_ext() 379 end = SECTION_ALIGN_UP(start_pfn + nr_pages); in online_page_ext() 387 nid = pfn_to_nid(start_pfn); in online_page_ext() 404 static void __meminit offline_page_ext(unsigned long start_pfn, in offline_page_ext() argument 409 start = SECTION_ALIGN_DOWN(start_pfn); in offline_page_ext() 410 end = SECTION_ALIGN_UP(start_pfn + nr_pages); in offline_page_ext() 438 ret = online_page_ext(mn->start_pfn, in page_ext_callback() 442 offline_page_ext(mn->start_pfn, in page_ext_callback() 446 offline_page_ext(mn->start_pfn, in page_ext_callback() [all …]
|
D | sparse.c | 129 static void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn, in mminit_validate_memmodel_limits() argument 138 if (*start_pfn > max_sparsemem_pfn) { in mminit_validate_memmodel_limits() 141 *start_pfn, *end_pfn, max_sparsemem_pfn); in mminit_validate_memmodel_limits() 143 *start_pfn = max_sparsemem_pfn; in mminit_validate_memmodel_limits() 148 *start_pfn, *end_pfn, max_sparsemem_pfn); in mminit_validate_memmodel_limits() 594 void online_mem_sections(unsigned long start_pfn, unsigned long end_pfn) in online_mem_sections() argument 598 for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { in online_mem_sections() 612 void offline_mem_sections(unsigned long start_pfn, unsigned long end_pfn) in offline_mem_sections() argument 616 for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { in offline_mem_sections() 893 int __meminit sparse_add_section(int nid, unsigned long start_pfn, in sparse_add_section() argument [all …]
|
D | shuffle.c | 83 unsigned long start_pfn = z->zone_start_pfn; in __shuffle_zone() local 89 start_pfn = ALIGN(start_pfn, order_pages); in __shuffle_zone() 90 for (i = start_pfn; i < end_pfn; i += order_pages) { in __shuffle_zone()
|
/linux-6.12.1/arch/powerpc/platforms/powernv/ |
D | memtrace.c | 91 static void memtrace_clear_range(unsigned long start_pfn, in memtrace_clear_range() argument 97 for (pfn = start_pfn; pfn < start_pfn + nr_pages; pfn++) { in memtrace_clear_range() 106 flush_dcache_range_chunked((unsigned long)pfn_to_kaddr(start_pfn), in memtrace_clear_range() 107 (unsigned long)pfn_to_kaddr(start_pfn + nr_pages), in memtrace_clear_range() 114 unsigned long pfn, start_pfn; in memtrace_alloc_node() local 125 start_pfn = page_to_pfn(page); in memtrace_alloc_node() 132 memtrace_clear_range(start_pfn, nr_pages); in memtrace_alloc_node() 138 for (pfn = start_pfn; pfn < start_pfn + nr_pages; pfn++) in memtrace_alloc_node() 141 arch_remove_linear_mapping(PFN_PHYS(start_pfn), size); in memtrace_alloc_node() 143 return PFN_PHYS(start_pfn); in memtrace_alloc_node() [all …]
|
/linux-6.12.1/arch/sparc/mm/ |
D | init_32.c | 64 unsigned long start_pfn = sp_banks[i].base_addr >> PAGE_SHIFT; in calc_highpages() local 70 if (start_pfn < max_low_pfn) in calc_highpages() 71 start_pfn = max_low_pfn; in calc_highpages() 73 nr += end_pfn - start_pfn; in calc_highpages() 133 unsigned long start_pfn, bytes_avail, size; in bootmem_init() local 171 start_pfn = (unsigned long)__pa(PAGE_ALIGN((unsigned long) &_end)); in bootmem_init() 174 start_pfn >>= PAGE_SHIFT; in bootmem_init() 192 size = (start_pfn << PAGE_SHIFT) - phys_base; in bootmem_init() 235 static void map_high_region(unsigned long start_pfn, unsigned long end_pfn) in map_high_region() argument 240 printk("mapping high region %08lx - %08lx\n", start_pfn, end_pfn); in map_high_region() [all …]
|
/linux-6.12.1/include/trace/events/ |
D | page_isolation.h | 13 unsigned long start_pfn, 17 TP_ARGS(start_pfn, end_pfn, fin_pfn), 20 __field(unsigned long, start_pfn) 26 __entry->start_pfn = start_pfn; 32 __entry->start_pfn, __entry->end_pfn, __entry->fin_pfn,
|
D | compaction.h | 17 unsigned long start_pfn, 22 TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken), 25 __field(unsigned long, start_pfn) 32 __entry->start_pfn = start_pfn; 39 __entry->start_pfn, 48 unsigned long start_pfn, 53 TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken) 59 unsigned long start_pfn, 64 TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken) 70 unsigned long start_pfn, [all …]
|
/linux-6.12.1/arch/x86/xen/ |
D | setup.c | 86 static void __init xen_del_extra_mem(unsigned long start_pfn, in xen_del_extra_mem() argument 93 start_r = xen_extra_mem[i].start_pfn; in xen_del_extra_mem() 97 if (start_r == start_pfn) { in xen_del_extra_mem() 99 xen_extra_mem[i].start_pfn += n_pfns; in xen_del_extra_mem() 104 if (start_r + size_r == start_pfn + n_pfns) { in xen_del_extra_mem() 110 if (start_pfn > start_r && start_pfn < start_r + size_r) { in xen_del_extra_mem() 111 BUG_ON(start_pfn + n_pfns > start_r + size_r); in xen_del_extra_mem() 112 xen_extra_mem[i].n_pfns = start_pfn - start_r; in xen_del_extra_mem() 114 xen_add_extra_mem(start_pfn + n_pfns, start_r + size_r - in xen_del_extra_mem() 115 (start_pfn + n_pfns)); in xen_del_extra_mem() [all …]
|
D | enlighten.c | 353 void __init xen_add_extra_mem(unsigned long start_pfn, unsigned long n_pfns) in xen_add_extra_mem() argument 364 xen_extra_mem[i].start_pfn = start_pfn; in xen_add_extra_mem() 369 if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns == in xen_add_extra_mem() 370 start_pfn) { in xen_add_extra_mem() 378 memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns)); in xen_add_extra_mem() 401 pfn_to_page(xen_extra_mem[i].start_pfn + j); in arch_xen_unpopulated_init()
|
/linux-6.12.1/arch/x86/mm/ |
D | init.c | 325 unsigned long start_pfn, unsigned long end_pfn, in save_mr() argument 328 if (start_pfn < end_pfn) { in save_mr() 331 mr[nr_range].start = start_pfn<<PAGE_SHIFT; in save_mr() 403 unsigned long start_pfn, end_pfn, limit_pfn; in split_mem_range() local 410 pfn = start_pfn = PFN_DOWN(start); in split_mem_range() 427 if (start_pfn < end_pfn) { in split_mem_range() 428 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0); in split_mem_range() 433 start_pfn = round_up(pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range() 442 if (start_pfn < end_pfn) { in split_mem_range() 443 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, in split_mem_range() [all …]
|
/linux-6.12.1/arch/sh/mm/ |
D | numa.c | 25 unsigned long start_pfn, end_pfn; in setup_bootmem_node() local 30 start_pfn = PFN_DOWN(start); in setup_bootmem_node() 38 __add_active_range(nid, start_pfn, end_pfn); in setup_bootmem_node() 48 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_bootmem_node() 49 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; in setup_bootmem_node()
|
D | init.c | 210 unsigned long start_pfn, end_pfn; in allocate_pgdat() local 212 get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); in allocate_pgdat() 218 NODE_DATA(nid)->node_start_pfn = start_pfn; in allocate_pgdat() 219 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; in allocate_pgdat() 224 unsigned long start_pfn, end_pfn; in do_init_bootmem() local 228 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) in do_init_bootmem() 229 __add_active_range(0, start_pfn, end_pfn); in do_init_bootmem() 242 unsigned long start_pfn; in early_reserve_mem() local 250 start_pfn = PFN_UP(__pa(_end)); in early_reserve_mem() 258 memblock_reserve(start, (PFN_PHYS(start_pfn) + PAGE_SIZE - 1) - start); in early_reserve_mem()
|
/linux-6.12.1/include/linux/ |
D | memory_hotplug.h | 130 extern unsigned long __offline_isolated_pages(unsigned long start_pfn, 157 extern void __remove_pages(unsigned long start_pfn, unsigned long nr_pages, 161 extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, 165 static inline int add_pages(int nid, unsigned long start_pfn, in add_pages() argument 168 return __add_pages(nid, start_pfn, nr_pages, params); in add_pages() 171 int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, 282 extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages, 291 static inline int offline_pages(unsigned long start_pfn, unsigned long nr_pages, in offline_pages() argument 314 extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, 318 unsigned long start_pfn, [all …]
|
D | node.h | 107 void register_memory_blocks_under_node(int nid, unsigned long start_pfn, 111 static inline void register_memory_blocks_under_node(int nid, unsigned long start_pfn, in register_memory_blocks_under_node() argument 131 unsigned long start_pfn = pgdat->node_start_pfn; in register_one_node() local 132 unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages; in register_one_node() 137 register_memory_blocks_under_node(nid, start_pfn, end_pfn, in register_one_node()
|
D | page-isolation.h | 41 int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, 44 void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, 47 int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
|
/linux-6.12.1/drivers/base/ |
D | memory.c | 188 unsigned long start_pfn = section_nr_to_pfn(mem->start_section_nr); in memory_block_online() local 199 start_pfn, nr_pages); in memory_block_online() 211 arg.altmap_start_pfn = start_pfn; in memory_block_online() 213 arg.start_pfn = start_pfn + nr_vmemmap_pages; in memory_block_online() 222 ret = mhp_init_memmap_on_memory(start_pfn, nr_vmemmap_pages, in memory_block_online() 228 ret = online_pages(start_pfn + nr_vmemmap_pages, in memory_block_online() 232 mhp_deinit_memmap_on_memory(start_pfn, nr_vmemmap_pages); in memory_block_online() 241 adjust_present_page_count(pfn_to_page(start_pfn), mem->group, in memory_block_online() 259 unsigned long start_pfn = section_nr_to_pfn(mem->start_section_nr); in memory_block_offline() local 277 adjust_present_page_count(pfn_to_page(start_pfn), mem->group, in memory_block_offline() [all …]
|
D | arch_numa.c | 195 static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn) in setup_node_data() argument 197 if (start_pfn >= end_pfn) in setup_node_data() 203 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_node_data() 204 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; in setup_node_data() 213 unsigned long start_pfn, end_pfn; in numa_register_nodes() local 215 get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); in numa_register_nodes() 216 setup_node_data(nid, start_pfn, end_pfn); in numa_register_nodes()
|
/linux-6.12.1/drivers/hv/ |
D | hv_balloon.c | 425 unsigned long start_pfn; member 438 unsigned long start_pfn; member 593 if (pfn >= gap->start_pfn && pfn < gap->end_pfn) in has_pfn_is_backed() 600 static unsigned long hv_page_offline_check(unsigned long start_pfn, in hv_page_offline_check() argument 603 unsigned long pfn = start_pfn, count = 0; in hv_page_offline_check() 607 while (pfn < start_pfn + nr_pages) { in hv_page_offline_check() 614 while ((pfn >= has->start_pfn) && in hv_page_offline_check() 616 (pfn < start_pfn + nr_pages)) { in hv_page_offline_check() 650 pfn_count = hv_page_offline_check(mem->start_pfn, in hv_memory_notifier() 697 unsigned long start_pfn, unsigned long size) in hv_bring_pgs_online() argument [all …]
|
/linux-6.12.1/arch/mips/loongson64/ |
D | numa.c | 85 unsigned long start_pfn, end_pfn; in node_mem_init() local 91 get_pfn_range_for_nid(node, &start_pfn, &end_pfn); in node_mem_init() 93 node, start_pfn, end_pfn); in node_mem_init() 97 NODE_DATA(node)->node_start_pfn = start_pfn; in node_mem_init() 98 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; in node_mem_init() 120 memblock_reserve(0, PAGE_SIZE * start_pfn); in node_mem_init()
|
/linux-6.12.1/arch/parisc/mm/ |
D | init.c | 133 if (pmem_ranges[j-1].start_pfn < in setup_bootmem() 134 pmem_ranges[j].start_pfn) { in setup_bootmem() 149 if (pmem_ranges[i].start_pfn - in setup_bootmem() 150 (pmem_ranges[i-1].start_pfn + in setup_bootmem() 155 pmem_ranges[i].start_pfn - in setup_bootmem() 156 (pmem_ranges[i-1].start_pfn + in setup_bootmem() 172 start = (pmem_ranges[i].start_pfn << PAGE_SHIFT); in setup_bootmem() 226 end_pfn = pmem_ranges[0].start_pfn + pmem_ranges[0].pages; in setup_bootmem() 229 hole_pages = pmem_ranges[i].start_pfn - end_pfn; in setup_bootmem() 231 pmem_holes[npmem_holes].start_pfn = end_pfn; in setup_bootmem() [all …]
|
/linux-6.12.1/drivers/gpu/drm/imagination/ |
D | pvr_vm_mips.c | 156 s32 start_pfn; in pvr_vm_mips_map() local 172 start_pfn = (start & fw_dev->fw_heap_info.offset_mask) >> ROGUE_MIPSFW_LOG2_PAGE_SIZE_4K; in pvr_vm_mips_map() 182 for (pfn = start_pfn; pfn <= end_pfn; pfn++) { in pvr_vm_mips_map() 187 (pfn - start_pfn) << in pvr_vm_mips_map() 205 while (--pfn >= start_pfn) in pvr_vm_mips_map() 228 const u32 start_pfn = (start & fw_dev->fw_heap_info.offset_mask) >> in pvr_vm_mips_unmap() local 233 for (u32 pfn = start_pfn; pfn < end_pfn; pfn++) in pvr_vm_mips_unmap()
|
/linux-6.12.1/arch/x86/virt/vmx/tdx/ |
D | tdx.c | 184 static int add_tdx_memblock(struct list_head *tmb_list, unsigned long start_pfn, in add_tdx_memblock() argument 194 tmb->start_pfn = start_pfn; in add_tdx_memblock() 223 unsigned long start_pfn, end_pfn; in build_tdx_memlist() local 226 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, &nid) { in build_tdx_memlist() 233 start_pfn = max(start_pfn, PHYS_PFN(SZ_1M)); in build_tdx_memlist() 234 if (start_pfn >= end_pfn) in build_tdx_memlist() 242 ret = add_tdx_memblock(tmb_list, start_pfn, end_pfn, nid); in build_tdx_memlist() 425 start = TDMR_ALIGN_DOWN(PFN_PHYS(tmb->start_pfn)); in fill_out_tdmrs() 771 start = PFN_PHYS(tmb->start_pfn); in tdmr_populate_rsvd_holes() 1371 static bool is_tdx_memory(unsigned long start_pfn, unsigned long end_pfn) in is_tdx_memory() argument [all …]
|