Home
last modified time | relevance | path

Searched refs:start_pfn (Results 1 – 25 of 98) sorted by relevance

1234

/Linux-v6.6/arch/x86/xen/
Dsetup.c99 static void __init xen_add_extra_mem(unsigned long start_pfn, in xen_add_extra_mem() argument
111 xen_extra_mem[i].start_pfn = start_pfn; in xen_add_extra_mem()
116 if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns == in xen_add_extra_mem()
117 start_pfn) { in xen_add_extra_mem()
125 memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns)); in xen_add_extra_mem()
128 static void __init xen_del_extra_mem(unsigned long start_pfn, in xen_del_extra_mem() argument
135 start_r = xen_extra_mem[i].start_pfn; in xen_del_extra_mem()
139 if (start_r == start_pfn) { in xen_del_extra_mem()
141 xen_extra_mem[i].start_pfn += n_pfns; in xen_del_extra_mem()
146 if (start_r + size_r == start_pfn + n_pfns) { in xen_del_extra_mem()
[all …]
/Linux-v6.6/mm/
Dmemory_hotplug.c413 unsigned long start_pfn, in find_smallest_section_pfn() argument
416 for (; start_pfn < end_pfn; start_pfn += PAGES_PER_SUBSECTION) { in find_smallest_section_pfn()
417 if (unlikely(!pfn_to_online_page(start_pfn))) in find_smallest_section_pfn()
420 if (unlikely(pfn_to_nid(start_pfn) != nid)) in find_smallest_section_pfn()
423 if (zone != page_zone(pfn_to_page(start_pfn))) in find_smallest_section_pfn()
426 return start_pfn; in find_smallest_section_pfn()
434 unsigned long start_pfn, in find_biggest_section_pfn() argument
441 for (; pfn >= start_pfn; pfn -= PAGES_PER_SUBSECTION) { in find_biggest_section_pfn()
457 static void shrink_zone_span(struct zone *zone, unsigned long start_pfn, in shrink_zone_span() argument
463 if (zone->zone_start_pfn == start_pfn) { in shrink_zone_span()
[all …]
Dmm_init.c299 unsigned long start_pfn, end_pfn; in early_calculate_totalpages() local
302 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, &nid) { in early_calculate_totalpages()
303 unsigned long pages = end_pfn - start_pfn; in early_calculate_totalpages()
456 unsigned long start_pfn, end_pfn; in find_zone_movable_pfns_for_nodes() local
474 for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) { in find_zone_movable_pfns_for_nodes()
477 start_pfn = max(start_pfn, zone_movable_pfn[nid]); in find_zone_movable_pfns_for_nodes()
478 if (start_pfn >= end_pfn) in find_zone_movable_pfns_for_nodes()
482 if (start_pfn < usable_startpfn) { in find_zone_movable_pfns_for_nodes()
485 - start_pfn; in find_zone_movable_pfns_for_nodes()
504 start_pfn = usable_startpfn; in find_zone_movable_pfns_for_nodes()
[all …]
Dpage_isolation.c33 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
174 check_unmovable_start = max(page_to_pfn(page), start_pfn); in set_migratetype_isolate()
309 unsigned long start_pfn; in isolate_single_pageblock() local
329 start_pfn = max(ALIGN_DOWN(isolate_pageblock, MAX_ORDER_NR_PAGES), in isolate_single_pageblock()
364 for (pfn = start_pfn; pfn < boundary_pfn;) { in isolate_single_pageblock()
528 int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, in start_isolate_page_range() argument
[all …]
Dpage_ext.c354 static int __meminit online_page_ext(unsigned long start_pfn, in online_page_ext() argument
361 start = SECTION_ALIGN_DOWN(start_pfn); in online_page_ext()
362 end = SECTION_ALIGN_UP(start_pfn + nr_pages); in online_page_ext()
370 nid = pfn_to_nid(start_pfn); in online_page_ext()
387 static void __meminit offline_page_ext(unsigned long start_pfn, in offline_page_ext() argument
392 start = SECTION_ALIGN_DOWN(start_pfn); in offline_page_ext()
393 end = SECTION_ALIGN_UP(start_pfn + nr_pages); in offline_page_ext()
421 ret = online_page_ext(mn->start_pfn, in page_ext_callback()
425 offline_page_ext(mn->start_pfn, in page_ext_callback()
429 offline_page_ext(mn->start_pfn, in page_ext_callback()
[all …]
Dsparse.c129 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()
592 void online_mem_sections(unsigned long start_pfn, unsigned long end_pfn) in online_mem_sections() argument
596 for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { in online_mem_sections()
610 void offline_mem_sections(unsigned long start_pfn, unsigned long end_pfn) in offline_mem_sections() argument
614 for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { in offline_mem_sections()
889 int __meminit sparse_add_section(int nid, unsigned long start_pfn, in sparse_add_section() argument
[all …]
Dshuffle.c83 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()
Dbootmem_info.c43 static void __init register_page_bootmem_info_section(unsigned long start_pfn) in register_page_bootmem_info_section() argument
50 section_nr = pfn_to_section_nr(start_pfn); in register_page_bootmem_info_section()
78 static void __init register_page_bootmem_info_section(unsigned long start_pfn) in register_page_bootmem_info_section() argument
85 section_nr = pfn_to_section_nr(start_pfn); in register_page_bootmem_info_section()
/Linux-v6.6/arch/x86/mm/
Dinit.c328 unsigned long start_pfn, unsigned long end_pfn, in save_mr() argument
331 if (start_pfn < end_pfn) { in save_mr()
334 mr[nr_range].start = start_pfn<<PAGE_SHIFT; in save_mr()
406 unsigned long start_pfn, end_pfn, limit_pfn; in split_mem_range() local
413 pfn = start_pfn = PFN_DOWN(start); in split_mem_range()
430 if (start_pfn < end_pfn) { in split_mem_range()
431 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0); in split_mem_range()
436 start_pfn = round_up(pfn, PFN_DOWN(PMD_SIZE)); in split_mem_range()
445 if (start_pfn < end_pfn) { in split_mem_range()
446 nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, in split_mem_range()
[all …]
/Linux-v6.6/arch/powerpc/platforms/powernv/
Dmemtrace.c91 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-v6.6/arch/sparc/mm/
Dinit_32.c64 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-v6.6/include/trace/events/
Dpage_isolation.h13 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,
Dcompaction.h17 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-v6.6/arch/sh/mm/
Dinit.c210 unsigned long start_pfn, end_pfn; in allocate_pgdat() local
212 get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); in allocate_pgdat()
223 NODE_DATA(nid)->node_start_pfn = start_pfn; in allocate_pgdat()
224 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; in allocate_pgdat()
229 unsigned long start_pfn, end_pfn; in do_init_bootmem() local
233 for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) in do_init_bootmem()
234 __add_active_range(0, start_pfn, end_pfn); in do_init_bootmem()
247 unsigned long start_pfn; in early_reserve_mem() local
255 start_pfn = PFN_UP(__pa(_end)); in early_reserve_mem()
263 memblock_reserve(start, (PFN_PHYS(start_pfn) + PAGE_SIZE - 1) - start); in early_reserve_mem()
[all …]
Dnuma.c28 unsigned long start_pfn, end_pfn; in setup_bootmem_node() local
33 start_pfn = PFN_DOWN(start); in setup_bootmem_node()
41 __add_active_range(nid, start_pfn, end_pfn); in setup_bootmem_node()
51 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_bootmem_node()
52 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; in setup_bootmem_node()
/Linux-v6.6/drivers/hv/
Dhv_balloon.c437 unsigned long start_pfn; member
450 unsigned long start_pfn; member
603 if ((pfn >= gap->start_pfn) && (pfn < gap->end_pfn)) in has_pfn_is_backed()
610 static unsigned long hv_page_offline_check(unsigned long start_pfn, in hv_page_offline_check() argument
613 unsigned long pfn = start_pfn, count = 0; in hv_page_offline_check()
617 while (pfn < start_pfn + nr_pages) { in hv_page_offline_check()
624 while ((pfn >= has->start_pfn) && in hv_page_offline_check()
626 (pfn < start_pfn + nr_pages)) { in hv_page_offline_check()
660 pfn_count = hv_page_offline_check(mem->start_pfn, in hv_memory_notifier()
708 unsigned long start_pfn, unsigned long size) in hv_bring_pgs_online() argument
[all …]
/Linux-v6.6/include/linux/
Dmemory_hotplug.h161 extern void __offline_isolated_pages(unsigned long start_pfn,
188 extern void __remove_pages(unsigned long start_pfn, unsigned long nr_pages,
192 extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
196 static inline int add_pages(int nid, unsigned long start_pfn, in add_pages() argument
199 return __add_pages(nid, start_pfn, nr_pages, params); in add_pages()
202 int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
308 extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages,
317 static inline int offline_pages(unsigned long start_pfn, unsigned long nr_pages, in offline_pages() argument
340 extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,
344 unsigned long start_pfn,
[all …]
Dnode.h96 void register_memory_blocks_under_node(int nid, unsigned long start_pfn,
100 static inline void register_memory_blocks_under_node(int nid, unsigned long start_pfn, in register_memory_blocks_under_node() argument
120 unsigned long start_pfn = pgdat->node_start_pfn; in register_one_node() local
121 unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages; in register_one_node()
126 register_memory_blocks_under_node(nid, start_pfn, end_pfn, in register_one_node()
Dpage-isolation.h40 int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
43 void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
46 int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
/Linux-v6.6/drivers/base/
Dmemory.c185 unsigned long start_pfn = section_nr_to_pfn(mem->start_section_nr); in memory_block_online() local
195 start_pfn, nr_pages); in memory_block_online()
208 ret = mhp_init_memmap_on_memory(start_pfn, nr_vmemmap_pages, zone); in memory_block_online()
213 ret = online_pages(start_pfn + nr_vmemmap_pages, in memory_block_online()
217 mhp_deinit_memmap_on_memory(start_pfn, nr_vmemmap_pages); in memory_block_online()
226 adjust_present_page_count(pfn_to_page(start_pfn), mem->group, in memory_block_online()
235 unsigned long start_pfn = section_nr_to_pfn(mem->start_section_nr); in memory_block_offline() local
251 adjust_present_page_count(pfn_to_page(start_pfn), mem->group, in memory_block_offline()
254 ret = offline_pages(start_pfn + nr_vmemmap_pages, in memory_block_offline()
259 adjust_present_page_count(pfn_to_page(start_pfn), in memory_block_offline()
[all …]
Darch_numa.c219 static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn) in setup_node_data() argument
226 if (start_pfn >= end_pfn) in setup_node_data()
246 NODE_DATA(nid)->node_start_pfn = start_pfn; in setup_node_data()
247 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; in setup_node_data()
363 unsigned long start_pfn, end_pfn; in numa_register_nodes() local
365 get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); in numa_register_nodes()
366 setup_node_data(nid, start_pfn, end_pfn); in numa_register_nodes()
/Linux-v6.6/arch/parisc/mm/
Dinit.c131 if (pmem_ranges[j-1].start_pfn < in setup_bootmem()
132 pmem_ranges[j].start_pfn) { in setup_bootmem()
147 if (pmem_ranges[i].start_pfn - in setup_bootmem()
148 (pmem_ranges[i-1].start_pfn + in setup_bootmem()
153 pmem_ranges[i].start_pfn - in setup_bootmem()
154 (pmem_ranges[i-1].start_pfn + in setup_bootmem()
170 start = (pmem_ranges[i].start_pfn << PAGE_SHIFT); in setup_bootmem()
224 end_pfn = pmem_ranges[0].start_pfn + pmem_ranges[0].pages; in setup_bootmem()
227 hole_pages = pmem_ranges[i].start_pfn - end_pfn; in setup_bootmem()
229 pmem_holes[npmem_holes].start_pfn = end_pfn; in setup_bootmem()
[all …]
/Linux-v6.6/arch/mips/loongson64/
Dnuma.c88 unsigned long start_pfn, end_pfn; in node_mem_init() local
97 get_pfn_range_for_nid(node, &start_pfn, &end_pfn); in node_mem_init()
99 node, start_pfn, end_pfn); in node_mem_init()
111 NODE_DATA(node)->node_start_pfn = start_pfn; in node_mem_init()
112 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; in node_mem_init()
134 memblock_reserve(0, PAGE_SIZE * start_pfn); in node_mem_init()
Dinit.c53 u64 node_id, node_psize, start_pfn, end_pfn, mem_start, mem_size; in szmem() local
72 start_pfn = ((node_id << 44) + mem_start) >> PAGE_SHIFT; in szmem()
74 end_pfn = start_pfn + node_psize; in szmem()
79 start_pfn, end_pfn, num_physpages); in szmem()
80 memblock_add_node(PFN_PHYS(start_pfn), in szmem()
/Linux-v6.6/arch/powerpc/mm/
Dmem.c125 int __ref add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, in add_pages() argument
130 ret = __add_pages(nid, start_pfn, nr_pages, params); in add_pages()
135 update_end_of_memory_vars(start_pfn << PAGE_SHIFT, in add_pages()
144 unsigned long start_pfn = start >> PAGE_SHIFT; in arch_add_memory() local
151 rc = add_pages(nid, start_pfn, nr_pages, params); in arch_add_memory()
159 unsigned long start_pfn = start >> PAGE_SHIFT; in arch_remove_memory() local
162 __remove_pages(start_pfn, nr_pages, altmap); in arch_remove_memory()

1234