summaryrefslogtreecommitdiff
path: root/arch/x86/mm/numa_64.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-02-16 12:13:07 +0100
committerTejun Heo <tj@kernel.org>2011-02-16 12:13:07 +0100
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)
cmdline = str;
}
-static int __init setup_physnodes(unsigned long start, unsigned long end,
- int acpi, int amd)
+static int __init setup_physnodes(unsigned long start, unsigned long end)
{
int ret = 0;
int i;
memset(physnodes, 0, sizeof(physnodes));
-#ifdef CONFIG_ACPI_NUMA
- if (acpi)
- acpi_get_nodes(physnodes, start, end);
-#endif
-#ifdef CONFIG_AMD_NUMA
- if (amd)
- amd_get_nodes(physnodes);
-#endif
+
+ for_each_node_mask(i, mem_nodes_parsed) {
+ physnodes[i].start = numa_nodes[i].start;
+ physnodes[i].end = numa_nodes[i].end;
+ }
+
/*
* Basic sanity checking on the physical node map: there may be errors
* 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,
init_memory_mapping_high();
for_each_node_mask(i, node_possible_map)
setup_node_bootmem(i, nodes[i].start, nodes[i].end);
- setup_physnodes(addr, max_addr, acpi, amd);
+ setup_physnodes(addr, max_addr);
fake_physnodes(acpi, amd, num_nodes);
numa_init_array();
return 0;
@@ -666,10 +663,10 @@ void __init initmem_init(void)
cutoff_node(j, 0, max_pfn << PAGE_SHIFT);
#ifdef CONFIG_NUMA_EMU
- setup_physnodes(0, max_pfn << PAGE_SHIFT, i == 0, i == 1);
+ setup_physnodes(0, max_pfn << PAGE_SHIFT);
if (cmdline && !numa_emulation(0, max_pfn, i == 0, i == 1))
return;
- setup_physnodes(0, max_pfn << PAGE_SHIFT, i == 0, i == 1);
+ setup_physnodes(0, max_pfn << PAGE_SHIFT);
nodes_clear(node_possible_map);
nodes_clear(node_online_map);
#endif