Lines Matching refs:start_pfn
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()
489 start_pfn); in shrink_zone_span()
528 unsigned long start_pfn, in remove_pfn_range_from_zone() argument
531 const unsigned long end_pfn = start_pfn + nr_pages; in remove_pfn_range_from_zone()
536 for (pfn = start_pfn; pfn < end_pfn; pfn += cur_nr_pages) { in remove_pfn_range_from_zone()
556 shrink_zone_span(zone, start_pfn, start_pfn + nr_pages); in remove_pfn_range_from_zone()
638 static void online_pages_range(unsigned long start_pfn, unsigned long nr_pages) in online_pages_range() argument
640 const unsigned long end_pfn = start_pfn + nr_pages; in online_pages_range()
652 for (pfn = start_pfn; pfn < end_pfn;) { in online_pages_range()
672 online_mem_sections(start_pfn, end_pfn); in online_pages_range()
699 static void __meminit resize_zone_range(struct zone *zone, unsigned long start_pfn, in resize_zone_range() argument
704 if (zone_is_empty(zone) || start_pfn < zone->zone_start_pfn) in resize_zone_range()
705 zone->zone_start_pfn = start_pfn; in resize_zone_range()
707 zone->spanned_pages = max(start_pfn + nr_pages, old_end_pfn) - zone->zone_start_pfn; in resize_zone_range()
710 static void __meminit resize_pgdat_range(struct pglist_data *pgdat, unsigned long start_pfn, in resize_pgdat_range() argument
715 if (!pgdat->node_spanned_pages || start_pfn < pgdat->node_start_pfn) in resize_pgdat_range()
716 pgdat->node_start_pfn = start_pfn; in resize_pgdat_range()
718 pgdat->node_spanned_pages = max(start_pfn + nr_pages, old_end_pfn) - pgdat->node_start_pfn; in resize_pgdat_range()
744 void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, in move_pfn_range_to_zone() argument
754 init_currently_empty_zone(zone, start_pfn, nr_pages); in move_pfn_range_to_zone()
755 resize_zone_range(zone, start_pfn, nr_pages); in move_pfn_range_to_zone()
756 resize_pgdat_range(pgdat, start_pfn, nr_pages); in move_pfn_range_to_zone()
765 if (!IS_ALIGNED(start_pfn, PAGES_PER_SECTION)) in move_pfn_range_to_zone()
766 section_taint_zone_device(start_pfn); in move_pfn_range_to_zone()
767 if (!IS_ALIGNED(start_pfn + nr_pages, PAGES_PER_SECTION)) in move_pfn_range_to_zone()
768 section_taint_zone_device(start_pfn + nr_pages); in move_pfn_range_to_zone()
777 memmap_init_range(nr_pages, nid, zone_idx(zone), start_pfn, 0, in move_pfn_range_to_zone()
892 static struct zone *default_kernel_zone_for_pfn(int nid, unsigned long start_pfn, in default_kernel_zone_for_pfn() argument
901 if (zone_intersects(zone, start_pfn, nr_pages)) in default_kernel_zone_for_pfn()
1019 static inline struct zone *default_zone_for_pfn(int nid, unsigned long start_pfn, in default_zone_for_pfn() argument
1022 struct zone *kernel_zone = default_kernel_zone_for_pfn(nid, start_pfn, in default_zone_for_pfn()
1025 bool in_kernel = zone_intersects(kernel_zone, start_pfn, nr_pages); in default_zone_for_pfn()
1026 bool in_movable = zone_intersects(movable_zone, start_pfn, nr_pages); in default_zone_for_pfn()
1044 struct memory_group *group, unsigned long start_pfn, in zone_for_pfn_range() argument
1048 return default_kernel_zone_for_pfn(nid, start_pfn, nr_pages); in zone_for_pfn_range()
1054 return auto_movable_zone_for_pfn(nid, group, start_pfn, nr_pages); in zone_for_pfn_range()
1056 return default_zone_for_pfn(nid, start_pfn, nr_pages); in zone_for_pfn_range()
1170 arg.start_pfn = pfn; in online_pages()
1773 static void do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) in do_migrate_range() argument
1781 for (pfn = start_pfn; pfn < end_pfn; pfn++) { in do_migrate_range()
1923 static int count_system_ram_pages_cb(unsigned long start_pfn, in count_system_ram_pages_cb() argument
1935 int offline_pages(unsigned long start_pfn, unsigned long nr_pages, in offline_pages() argument
1938 const unsigned long end_pfn = start_pfn + nr_pages; in offline_pages()
1953 if (WARN_ON_ONCE(!nr_pages || !pageblock_aligned(start_pfn) || in offline_pages()
1954 !IS_ALIGNED(start_pfn + nr_pages, PAGES_PER_SECTION))) in offline_pages()
1965 walk_system_ram_range(start_pfn, nr_pages, &system_ram_pages, in offline_pages()
1978 if (WARN_ON_ONCE(page_zone(pfn_to_page(start_pfn)) != zone || in offline_pages()
1993 ret = start_isolate_page_range(start_pfn, end_pfn, in offline_pages()
2002 arg.start_pfn = start_pfn; in offline_pages()
2014 pfn = start_pfn; in offline_pages()
2049 ret = dissolve_free_hugetlb_folios(start_pfn, end_pfn); in offline_pages()
2055 ret = test_pages_isolated(start_pfn, end_pfn, MEMORY_OFFLINE); in offline_pages()
2060 managed_pages = __offline_isolated_pages(start_pfn, end_pfn); in offline_pages()
2076 adjust_managed_page_count(pfn_to_page(start_pfn), -managed_pages); in offline_pages()
2077 adjust_present_page_count(pfn_to_page(start_pfn), group, -nr_pages); in offline_pages()
2100 remove_pfn_range_from_zone(zone, start_pfn, nr_pages); in offline_pages()
2105 undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); in offline_pages()
2112 (unsigned long long) start_pfn << PAGE_SHIFT, in offline_pages()