aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/numa_64.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-02-16 06:13:07 -0500
committerTejun Heo <tj@kernel.org>2011-02-16 06:13:07 -0500
commit19095548704ecd0f32fd5deba01d56430ad7a344 (patch)
treed381be4321d1755d0c79de7264b583898db572ad /arch/x86/mm/numa_64.c
parent206e42087a037fa3adca8908fd318a0cb64d4dee (diff)
x86-64, NUMA: Kill {acpi|amd}_get_nodes()
With common numa_nodes[], common code in numa_64.c can access it directly. Copy directly and kill {acpi|amd}_get_nodes(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Brian Gerst <brgerst@gmail.com> Cc: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Shaohui Zheng <shaohui.zheng@intel.com> Cc: David Rientjes <rientjes@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm/numa_64.c')
-rw-r--r--arch/x86/mm/numa_64.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index a6b899f7ddd2..82ee3083b094 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -257,21 +257,18 @@ void __init numa_emu_cmdline(char *str)
257 cmdline = str; 257 cmdline = str;
258} 258}
259 259
260static int __init setup_physnodes(unsigned long start, unsigned long end, 260static int __init setup_physnodes(unsigned long start, unsigned long end)
261 int acpi, int amd)
262{ 261{
263 int ret = 0; 262 int ret = 0;
264 int i; 263 int i;
265 264
266 memset(physnodes, 0, sizeof(physnodes)); 265 memset(physnodes, 0, sizeof(physnodes));
267#ifdef CONFIG_ACPI_NUMA 266
268 if (acpi) 267 for_each_node_mask(i, mem_nodes_parsed) {
269 acpi_get_nodes(physnodes, start, end); 268 physnodes[i].start = numa_nodes[i].start;
270#endif 269 physnodes[i].end = numa_nodes[i].end;
271#ifdef CONFIG_AMD_NUMA 270 }
272 if (amd) 271
273 amd_get_nodes(physnodes);
274#endif
275 /* 272 /*
276 * Basic sanity checking on the physical node map: there may be errors 273 * Basic sanity checking on the physical node map: there may be errors
277 * if the SRAT or AMD code incorrectly reported the topology or the mem= 274 * if the SRAT or AMD code incorrectly reported the topology or the mem=
@@ -594,7 +591,7 @@ static int __init numa_emulation(unsigned long start_pfn,
594 init_memory_mapping_high(); 591 init_memory_mapping_high();
595 for_each_node_mask(i, node_possible_map) 592 for_each_node_mask(i, node_possible_map)
596 setup_node_bootmem(i, nodes[i].start, nodes[i].end); 593 setup_node_bootmem(i, nodes[i].start, nodes[i].end);
597 setup_physnodes(addr, max_addr, acpi, amd); 594 setup_physnodes(addr, max_addr);
598 fake_physnodes(acpi, amd, num_nodes); 595 fake_physnodes(acpi, amd, num_nodes);
599 numa_init_array(); 596 numa_init_array();
600 return 0; 597 return 0;
@@ -666,10 +663,10 @@ void __init initmem_init(void)
666 cutoff_node(j, 0, max_pfn << PAGE_SHIFT); 663 cutoff_node(j, 0, max_pfn << PAGE_SHIFT);
667 664
668#ifdef CONFIG_NUMA_EMU 665#ifdef CONFIG_NUMA_EMU
669 setup_physnodes(0, max_pfn << PAGE_SHIFT, i == 0, i == 1); 666 setup_physnodes(0, max_pfn << PAGE_SHIFT);
670 if (cmdline && !numa_emulation(0, max_pfn, i == 0, i == 1)) 667 if (cmdline && !numa_emulation(0, max_pfn, i == 0, i == 1))
671 return; 668 return;
672 setup_physnodes(0, max_pfn << PAGE_SHIFT, i == 0, i == 1); 669 setup_physnodes(0, max_pfn << PAGE_SHIFT);
673 nodes_clear(node_possible_map); 670 nodes_clear(node_possible_map);
674 nodes_clear(node_online_map); 671 nodes_clear(node_online_map);
675#endif 672#endif