aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8d52ab18fe0d..375327b8e932 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3871,18 +3871,29 @@ static int __build_all_zonelists(void *data)
3871 return 0; 3871 return 0;
3872} 3872}
3873 3873
3874static noinline void __init
3875build_all_zonelists_init(void)
3876{
3877 __build_all_zonelists(NULL);
3878 mminit_verify_zonelist();
3879 cpuset_init_current_mems_allowed();
3880}
3881
3874/* 3882/*
3875 * Called with zonelists_mutex held always 3883 * Called with zonelists_mutex held always
3876 * unless system_state == SYSTEM_BOOTING. 3884 * unless system_state == SYSTEM_BOOTING.
3885 *
3886 * __ref due to (1) call of __meminit annotated setup_zone_pageset
3887 * [we're only called with non-NULL zone through __meminit paths] and
3888 * (2) call of __init annotated helper build_all_zonelists_init
3889 * [protected by SYSTEM_BOOTING].
3877 */ 3890 */
3878void __ref build_all_zonelists(pg_data_t *pgdat, struct zone *zone) 3891void __ref build_all_zonelists(pg_data_t *pgdat, struct zone *zone)
3879{ 3892{
3880 set_zonelist_order(); 3893 set_zonelist_order();
3881 3894
3882 if (system_state == SYSTEM_BOOTING) { 3895 if (system_state == SYSTEM_BOOTING) {
3883 __build_all_zonelists(NULL); 3896 build_all_zonelists_init();
3884 mminit_verify_zonelist();
3885 cpuset_init_current_mems_allowed();
3886 } else { 3897 } else {
3887#ifdef CONFIG_MEMORY_HOTPLUG 3898#ifdef CONFIG_MEMORY_HOTPLUG
3888 if (zone) 3899 if (zone)