diff options
-rw-r--r-- | init/main.c | 3 | ||||
-rw-r--r-- | mm/page_ext.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/init/main.c b/init/main.c index bc0f9e0bcf22..4c17fda5c2ff 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -607,6 +607,7 @@ asmlinkage __visible void __init start_kernel(void) | |||
607 | initrd_start = 0; | 607 | initrd_start = 0; |
608 | } | 608 | } |
609 | #endif | 609 | #endif |
610 | page_ext_init(); | ||
610 | debug_objects_mem_init(); | 611 | debug_objects_mem_init(); |
611 | kmemleak_init(); | 612 | kmemleak_init(); |
612 | setup_per_cpu_pageset(); | 613 | setup_per_cpu_pageset(); |
@@ -1003,8 +1004,6 @@ static noinline void __init kernel_init_freeable(void) | |||
1003 | sched_init_smp(); | 1004 | sched_init_smp(); |
1004 | 1005 | ||
1005 | page_alloc_init_late(); | 1006 | page_alloc_init_late(); |
1006 | /* Initialize page ext after all struct pages are initializaed */ | ||
1007 | page_ext_init(); | ||
1008 | 1007 | ||
1009 | do_basic_setup(); | 1008 | do_basic_setup(); |
1010 | 1009 | ||
diff --git a/mm/page_ext.c b/mm/page_ext.c index 2d864e64f7fe..44a4c029c8e7 100644 --- a/mm/page_ext.c +++ b/mm/page_ext.c | |||
@@ -390,8 +390,10 @@ void __init page_ext_init(void) | |||
390 | * We know some arch can have a nodes layout such as | 390 | * We know some arch can have a nodes layout such as |
391 | * -------------pfn--------------> | 391 | * -------------pfn--------------> |
392 | * N0 | N1 | N2 | N0 | N1 | N2|.... | 392 | * N0 | N1 | N2 | N0 | N1 | N2|.... |
393 | * | ||
394 | * Take into account DEFERRED_STRUCT_PAGE_INIT. | ||
393 | */ | 395 | */ |
394 | if (pfn_to_nid(pfn) != nid) | 396 | if (early_pfn_to_nid(pfn) != nid) |
395 | continue; | 397 | continue; |
396 | if (init_section_page_ext(pfn, nid)) | 398 | if (init_section_page_ext(pfn, nid)) |
397 | goto oom; | 399 | goto oom; |