From 0327045b813681f062df941f844722f58a516c09 Mon Sep 17 00:00:00 2001 From: Yasunori Goto Date: Tue, 4 Jul 2006 02:57:51 -0700 Subject: [PATCH] --- yaml --- r: 32043 b: refs/heads/master c: dd8041f16b117f63f40fb844d6cdebe8b03514d2 h: refs/heads/master i: 32041: 68a6e364a7f1b60896debc528f7c974b0949f18c 32039: ffb3c0edbd6ab279e42a40330f88d3a5690813c5 v: v3 --- [refs] | 2 +- trunk/arch/ia64/mm/discontig.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 38c766c7f18b..410f25f354ba 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 31304c909e6945b005af62cd55a582e9c010a0b4 +refs/heads/master: dd8041f16b117f63f40fb844d6cdebe8b03514d2 diff --git a/trunk/arch/ia64/mm/discontig.c b/trunk/arch/ia64/mm/discontig.c index 525b082eb661..99bd9e30db96 100644 --- a/trunk/arch/ia64/mm/discontig.c +++ b/trunk/arch/ia64/mm/discontig.c @@ -313,9 +313,19 @@ static void __meminit scatter_node_data(void) pg_data_t **dst; int node; - for_each_online_node(node) { - dst = LOCAL_DATA_ADDR(pgdat_list[node])->pg_data_ptrs; - memcpy(dst, pgdat_list, sizeof(pgdat_list)); + /* + * for_each_online_node() can't be used at here. + * node_online_map is not set for hot-added nodes at this time, + * because we are halfway through initialization of the new node's + * structures. If for_each_online_node() is used, a new node's + * pg_data_ptrs will be not initialized. Insted of using it, + * pgdat_list[] is checked. + */ + for_each_node(node) { + if (pgdat_list[node]) { + dst = LOCAL_DATA_ADDR(pgdat_list[node])->pg_data_ptrs; + memcpy(dst, pgdat_list, sizeof(pgdat_list)); + } } }