aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/acpi.h2
-rw-r--r--arch/x86/include/asm/amd_nb.h1
-rw-r--r--arch/x86/mm/amdtopology_64.c10
-rw-r--r--arch/x86/mm/numa_64.c23
-rw-r--r--arch/x86/mm/srat_64.c13
5 files changed, 10 insertions, 39 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 06fb7865eff2..446a5b9a1d5f 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -185,8 +185,6 @@ struct bootnode;
185 185
186#ifdef CONFIG_ACPI_NUMA 186#ifdef CONFIG_ACPI_NUMA
187extern int acpi_numa; 187extern int acpi_numa;
188extern void acpi_get_nodes(struct bootnode *physnodes, unsigned long start,
189 unsigned long end);
190extern int x86_acpi_numa_init(void); 188extern int x86_acpi_numa_init(void);
191extern int acpi_scan_nodes(void); 189extern int acpi_scan_nodes(void);
192#define NR_NODE_MEMBLKS (MAX_NUMNODES*2) 190#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
index dc3c6e34da1d..246cdc6ca9ba 100644
--- a/arch/x86/include/asm/amd_nb.h
+++ b/arch/x86/include/asm/amd_nb.h
@@ -23,7 +23,6 @@ extern int amd_set_subcaches(int, int);
23 23
24#ifdef CONFIG_NUMA_EMU 24#ifdef CONFIG_NUMA_EMU
25extern void amd_fake_nodes(const struct bootnode *nodes, int nr_nodes); 25extern void amd_fake_nodes(const struct bootnode *nodes, int nr_nodes);
26extern void amd_get_nodes(struct bootnode *nodes);
27#endif 26#endif
28 27
29struct amd_northbridge { 28struct amd_northbridge {
diff --git a/arch/x86/mm/amdtopology_64.c b/arch/x86/mm/amdtopology_64.c
index f049fa67ed73..cf29527885f8 100644
--- a/arch/x86/mm/amdtopology_64.c
+++ b/arch/x86/mm/amdtopology_64.c
@@ -204,16 +204,6 @@ static s16 fake_apicid_to_node[MAX_LOCAL_APIC] __initdata = {
204 [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE 204 [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE
205}; 205};
206 206
207void __init amd_get_nodes(struct bootnode *physnodes)
208{
209 int i;
210
211 for_each_node_mask(i, mem_nodes_parsed) {
212 physnodes[i].start = numa_nodes[i].start;
213 physnodes[i].end = numa_nodes[i].end;
214 }
215}
216
217static int __init find_node_by_addr(unsigned long addr) 207static int __init find_node_by_addr(unsigned long addr)
218{ 208{
219 int ret = NUMA_NO_NODE; 209 int ret = NUMA_NO_NODE;
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
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index bfa4a6af5cfe..82b1087963a2 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -323,19 +323,6 @@ static int __init nodes_cover_memory(const struct bootnode *nodes)
323 323
324void __init acpi_numa_arch_fixup(void) {} 324void __init acpi_numa_arch_fixup(void) {}
325 325
326#ifdef CONFIG_NUMA_EMU
327void __init acpi_get_nodes(struct bootnode *physnodes, unsigned long start,
328 unsigned long end)
329{
330 int i;
331
332 for_each_node_mask(i, mem_nodes_parsed) {
333 physnodes[i].start = numa_nodes[i].start;
334 physnodes[i].end = numa_nodes[i].end;
335 }
336}
337#endif /* CONFIG_NUMA_EMU */
338
339int __init x86_acpi_numa_init(void) 326int __init x86_acpi_numa_init(void)
340{ 327{
341 int ret; 328 int ret;