Lines Matching refs:zone
52 struct zone *zone; in mminit_verify_zonelist() local
63 zone = &pgdat->node_zones[zoneid]; in mminit_verify_zonelist()
64 if (!populated_zone(zone)) in mminit_verify_zonelist()
70 zone->name); in mminit_verify_zonelist()
73 for_each_zone_zonelist(zone, z, zonelist, zoneid) in mminit_verify_zonelist()
74 pr_cont("%d:%s ", zone_to_nid(zone), zone->name); in mminit_verify_zonelist()
566 unsigned long zone, int nid) in __init_single_page() argument
569 set_page_links(page, zone, nid, pfn); in __init_single_page()
578 if (!is_highmem_idx(zone)) in __init_single_page()
720 struct zone *zone = &pgdat->node_zones[zid]; in init_reserved_page() local
722 if (zone_spans_pfn(zone, pfn)) in init_reserved_page()
775 overlap_memmap_init(unsigned long zone, unsigned long *pfn) in overlap_memmap_init() argument
779 if (mirrored_kernelcore && zone == ZONE_MOVABLE) { in overlap_memmap_init()
820 int zone, int node) in init_unavailable_range() argument
830 __init_single_page(pfn_to_page(pfn), pfn, zone, node); in init_unavailable_range()
837 node, zone_names[zone], pgcnt); in init_unavailable_range()
849 void __meminit memmap_init_range(unsigned long size, int nid, unsigned long zone, in memmap_init_range() argument
868 if (zone == ZONE_DEVICE) { in memmap_init_range()
884 if (overlap_memmap_init(zone, &pfn)) in memmap_init_range()
893 __init_single_page(page, pfn, zone, nid); in memmap_init_range()
896 if (zone == ZONE_DEVICE) in memmap_init_range()
916 static void __init memmap_init_zone_range(struct zone *zone, in memmap_init_zone_range() argument
921 unsigned long zone_start_pfn = zone->zone_start_pfn; in memmap_init_zone_range()
922 unsigned long zone_end_pfn = zone_start_pfn + zone->spanned_pages; in memmap_init_zone_range()
923 int nid = zone_to_nid(zone), zone_id = zone_idx(zone); in memmap_init_zone_range()
950 struct zone *zone = node->node_zones + j; in memmap_init() local
952 if (!populated_zone(zone)) in memmap_init()
955 memmap_init_zone_range(zone, start_pfn, end_pfn, in memmap_init()
1070 void __ref memmap_init_zone_device(struct zone *zone, in memmap_init_zone_device() argument
1076 struct pglist_data *pgdat = zone->zone_pgdat; in memmap_init_zone_device()
1079 unsigned long zone_idx = zone_idx(zone); in memmap_init_zone_device()
1258 struct zone *z; in reset_memoryless_node_totalpages()
1306 struct zone *zone = pgdat->node_zones + i; in calculate_node_totalpages() local
1323 zone->zone_start_pfn = zone_start_pfn; in calculate_node_totalpages()
1325 zone->zone_start_pfn = 0; in calculate_node_totalpages()
1326 zone->spanned_pages = spanned; in calculate_node_totalpages()
1327 zone->present_pages = real_size; in calculate_node_totalpages()
1329 zone->present_early_pages = real_size; in calculate_node_totalpages()
1383 static void __meminit zone_init_internals(struct zone *zone, enum zone_type idx, int nid, in zone_init_internals() argument
1386 atomic_long_set(&zone->managed_pages, remaining_pages); in zone_init_internals()
1387 zone_set_nid(zone, nid); in zone_init_internals()
1388 zone->name = zone_names[idx]; in zone_init_internals()
1389 zone->zone_pgdat = NODE_DATA(nid); in zone_init_internals()
1390 spin_lock_init(&zone->lock); in zone_init_internals()
1391 zone_seqlock_init(zone); in zone_init_internals()
1392 zone_pcp_init(zone); in zone_init_internals()
1395 static void __meminit zone_init_free_lists(struct zone *zone) in zone_init_free_lists() argument
1399 INIT_LIST_HEAD(&zone->free_area[order].free_list[t]); in zone_init_free_lists()
1400 zone->free_area[order].nr_free = 0; in zone_init_free_lists()
1404 INIT_LIST_HEAD(&zone->unaccepted_pages); in zone_init_free_lists()
1408 void __meminit init_currently_empty_zone(struct zone *zone, in init_currently_empty_zone() argument
1412 struct pglist_data *pgdat = zone->zone_pgdat; in init_currently_empty_zone()
1413 int zone_idx = zone_idx(zone) + 1; in init_currently_empty_zone()
1418 zone->zone_start_pfn = zone_start_pfn; in init_currently_empty_zone()
1423 (unsigned long)zone_idx(zone), in init_currently_empty_zone()
1426 zone_init_free_lists(zone); in init_currently_empty_zone()
1427 zone->initialized = 1; in init_currently_empty_zone()
1451 static void __ref setup_usemap(struct zone *zone) in setup_usemap() argument
1453 unsigned long usemapsize = usemap_size(zone->zone_start_pfn, in setup_usemap()
1454 zone->spanned_pages); in setup_usemap()
1455 zone->pageblock_flags = NULL; in setup_usemap()
1457 zone->pageblock_flags = in setup_usemap()
1459 zone_to_nid(zone)); in setup_usemap()
1460 if (!zone->pageblock_flags) in setup_usemap()
1462 usemapsize, zone->name, zone_to_nid(zone)); in setup_usemap()
1466 static inline void setup_usemap(struct zone *zone) {} in setup_usemap() argument
1547 struct zone *zone = pgdat->node_zones + z; in free_area_init_core_hotplug() local
1549 zone->present_pages = 0; in free_area_init_core_hotplug()
1550 zone_init_internals(zone, z, nid, 0); in free_area_init_core_hotplug()
1564 struct zone *zone = pgdat->node_zones + j; in free_area_init_core() local
1565 unsigned long size = zone->spanned_pages; in free_area_init_core()
1571 zone_init_internals(zone, j, nid, zone->present_pages); in free_area_init_core()
1576 setup_usemap(zone); in free_area_init_core()
1577 init_currently_empty_zone(zone, zone->zone_start_pfn, size); in free_area_init_core()
1711 struct zone *zone = &pgdat->node_zones[zone_type]; in check_for_memory() local
1712 if (populated_zone(zone)) { in check_for_memory()
1760 int i, nid, zone; in free_area_init() local
1774 zone = MAX_NR_ZONES - i - 1; in free_area_init()
1776 zone = i; in free_area_init()
1778 if (zone == ZONE_MOVABLE) in free_area_init()
1781 end_pfn = max(max_zone_pfn[zone], start_pfn); in free_area_init()
1782 arch_zone_lowest_possible_pfn[zone] = start_pfn; in free_area_init()
1783 arch_zone_highest_possible_pfn[zone] = end_pfn; in free_area_init()
1960 static unsigned long __init deferred_init_pages(struct zone *zone, in deferred_init_pages() argument
1963 int nid = zone_to_nid(zone); in deferred_init_pages()
1965 int zid = zone_idx(zone); in deferred_init_pages()
1982 deferred_init_mem_pfn_range_in_zone(u64 *i, struct zone *zone, in deferred_init_mem_pfn_range_in_zone() argument
1989 __next_mem_pfn_range_in_zone(&j, zone, spfn, epfn); in deferred_init_mem_pfn_range_in_zone()
1996 for_each_free_mem_pfn_range_in_zone_from(j, zone, spfn, epfn) { in deferred_init_mem_pfn_range_in_zone()
2019 deferred_init_maxorder(u64 *i, struct zone *zone, unsigned long *start_pfn, in deferred_init_maxorder() argument
2028 for_each_free_mem_pfn_range_in_zone_from(j, zone, start_pfn, end_pfn) { in deferred_init_maxorder()
2035 nr_pages += deferred_init_pages(zone, *start_pfn, t); in deferred_init_maxorder()
2046 for_each_free_mem_pfn_range_in_zone_from(j, zone, &spfn, &epfn) { in deferred_init_maxorder()
2067 struct zone *zone = arg; in deferred_init_memmap_chunk() local
2070 deferred_init_mem_pfn_range_in_zone(&i, zone, &spfn, &epfn, start_pfn); in deferred_init_memmap_chunk()
2077 deferred_init_maxorder(&i, zone, &spfn, &epfn); in deferred_init_memmap_chunk()
2096 struct zone *zone; in deferred_init_memmap() local
2125 zone = pgdat->node_zones + pgdat->nr_zones - 1; in deferred_init_memmap()
2129 while (deferred_init_mem_pfn_range_in_zone(&i, zone, &spfn, &epfn, first_init_pfn)) { in deferred_init_memmap()
2133 .fn_arg = zone, in deferred_init_memmap()
2146 WARN_ON(pgdat->nr_zones < MAX_NR_ZONES && populated_zone(++zone)); in deferred_init_memmap()
2166 bool __init deferred_grow_zone(struct zone *zone, unsigned int order) in deferred_grow_zone() argument
2169 pg_data_t *pgdat = zone->zone_pgdat; in deferred_grow_zone()
2176 if (zone_end_pfn(zone) != pgdat_end_pfn(pgdat)) in deferred_grow_zone()
2191 if (!deferred_init_mem_pfn_range_in_zone(&i, zone, &spfn, &epfn, in deferred_grow_zone()
2208 nr_pages += deferred_init_maxorder(&i, zone, &spfn, &epfn); in deferred_grow_zone()
2250 void set_zone_contiguous(struct zone *zone) in set_zone_contiguous() argument
2252 unsigned long block_start_pfn = zone->zone_start_pfn; in set_zone_contiguous()
2256 for (; block_start_pfn < zone_end_pfn(zone); in set_zone_contiguous()
2260 block_end_pfn = min(block_end_pfn, zone_end_pfn(zone)); in set_zone_contiguous()
2263 block_end_pfn, zone)) in set_zone_contiguous()
2269 zone->contiguous = true; in set_zone_contiguous()
2275 struct zone *zone; in page_alloc_init_late() local
2309 for_each_populated_zone(zone) in page_alloc_init_late()
2310 set_zone_contiguous(zone); in page_alloc_init_late()