]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
acpi, movablemem_map: Do not zero numa_meminfo in numa_init().
authorTang Chen <tangchen@cn.fujitsu.com>
Wed, 20 Feb 2013 02:14:28 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:38 +0000 (16:52 +1100)
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 <tangchen@cn.fujitsu.com>
Reported-by: Li Shaohua <shli@kernel.org>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/mm/numa.c

index 3545585207c771b294497d18d5c8f1da5481f151..ff3633c794c687ccd87cb66b62cdd2a4c3a6e918 100644 (file)
@@ -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();