From: Tang Chen Date: Wed, 20 Feb 2013 02:14:28 +0000 (+1100) Subject: acpi, movablemem_map: Do not zero numa_meminfo in numa_init(). X-Git-Tag: next-20130220~1^2~500 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=31a478ca9d4d60618f5b580107f0a65166e68b96;p=karo-tx-linux.git acpi, movablemem_map: Do not zero numa_meminfo in numa_init(). early_parse_srat() is called before numa_init(), and has initialized numa_meminfo. So do not zero numa_meminfo in numa_init(), otherwise we will lose memory numa info. Signed-off-by: Tang Chen Reported-by: Li Shaohua Cc: Tang Chen Cc: Wen Congyang Cc: Jiang Liu Cc: Jianguo Wu Cc: Lai Jiangshan Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton --- diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 3545585207c7..ff3633c794c6 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -559,10 +559,12 @@ static int __init numa_init(int (*init_func)(void)) for (i = 0; i < MAX_LOCAL_APIC; i++) set_apicid_to_node(i, NUMA_NO_NODE); - /* Do not clear numa_nodes_parsed because SRAT was parsed earlier. */ + /* + * Do not clear numa_nodes_parsed or zero numa_meminfo here, because + * SRAT was parsed earlier in early_parse_srat(). + */ nodes_clear(node_possible_map); nodes_clear(node_online_map); - memset(&numa_meminfo, 0, sizeof(numa_meminfo)); WARN_ON(memblock_set_node(0, ULLONG_MAX, MAX_NUMNODES)); numa_reset_distance();