aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/mm/discontig.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 525b082eb661..99bd9e30db96 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -313,9 +313,19 @@ static void __meminit scatter_node_data(void)
313 pg_data_t **dst; 313 pg_data_t **dst;
314 int node; 314 int node;
315 315
316 for_each_online_node(node) { 316 /*
317 dst = LOCAL_DATA_ADDR(pgdat_list[node])->pg_data_ptrs; 317 * for_each_online_node() can't be used at here.
318 memcpy(dst, pgdat_list, sizeof(pgdat_list)); 318 * node_online_map is not set for hot-added nodes at this time,
319 * because we are halfway through initialization of the new node's
320 * structures. If for_each_online_node() is used, a new node's
321 * pg_data_ptrs will be not initialized. Insted of using it,
322 * pgdat_list[] is checked.
323 */
324 for_each_node(node) {
325 if (pgdat_list[node]) {
326 dst = LOCAL_DATA_ADDR(pgdat_list[node])->pg_data_ptrs;
327 memcpy(dst, pgdat_list, sizeof(pgdat_list));
328 }
319 } 329 }
320} 330}
321 331