diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 98fe3b68f209..5b939bd1bff9 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -6364,6 +6364,21 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) | |||
6364 | static void __ref alloc_node_mem_map(struct pglist_data *pgdat) { } | 6364 | static void __ref alloc_node_mem_map(struct pglist_data *pgdat) { } |
6365 | #endif /* CONFIG_FLAT_NODE_MEM_MAP */ | 6365 | #endif /* CONFIG_FLAT_NODE_MEM_MAP */ |
6366 | 6366 | ||
6367 | #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT | ||
6368 | static inline void pgdat_set_deferred_range(pg_data_t *pgdat) | ||
6369 | { | ||
6370 | /* | ||
6371 | * We start only with one section of pages, more pages are added as | ||
6372 | * needed until the rest of deferred pages are initialized. | ||
6373 | */ | ||
6374 | pgdat->static_init_pgcnt = min_t(unsigned long, PAGES_PER_SECTION, | ||
6375 | pgdat->node_spanned_pages); | ||
6376 | pgdat->first_deferred_pfn = ULONG_MAX; | ||
6377 | } | ||
6378 | #else | ||
6379 | static inline void pgdat_set_deferred_range(pg_data_t *pgdat) {} | ||
6380 | #endif | ||
6381 | |||
6367 | void __meminit free_area_init_node(int nid, unsigned long *zones_size, | 6382 | void __meminit free_area_init_node(int nid, unsigned long *zones_size, |
6368 | unsigned long node_start_pfn, | 6383 | unsigned long node_start_pfn, |
6369 | unsigned long *zholes_size) | 6384 | unsigned long *zholes_size) |
@@ -6390,16 +6405,8 @@ void __meminit free_area_init_node(int nid, unsigned long *zones_size, | |||
6390 | zones_size, zholes_size); | 6405 | zones_size, zholes_size); |
6391 | 6406 | ||
6392 | alloc_node_mem_map(pgdat); | 6407 | alloc_node_mem_map(pgdat); |
6408 | pgdat_set_deferred_range(pgdat); | ||
6393 | 6409 | ||
6394 | #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT | ||
6395 | /* | ||
6396 | * We start only with one section of pages, more pages are added as | ||
6397 | * needed until the rest of deferred pages are initialized. | ||
6398 | */ | ||
6399 | pgdat->static_init_pgcnt = min_t(unsigned long, PAGES_PER_SECTION, | ||
6400 | pgdat->node_spanned_pages); | ||
6401 | pgdat->first_deferred_pfn = ULONG_MAX; | ||
6402 | #endif | ||
6403 | free_area_init_core(pgdat); | 6410 | free_area_init_core(pgdat); |
6404 | } | 6411 | } |
6405 | 6412 | ||