aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/mm/srat.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index 36bc7be9afb9..d66b814e5033 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -177,6 +177,14 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
177 int i; 177 int i;
178 if (acpi_numa <= 0) 178 if (acpi_numa <= 0)
179 return -1; 179 return -1;
180
181 /* First clean up the node list */
182 for_each_node_mask(i, nodes_parsed) {
183 cutoff_node(i, start, end);
184 if (nodes[i].start == nodes[i].end)
185 node_clear(i, nodes_parsed);
186 }
187
180 memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed)); 188 memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed));
181 if (memnode_shift < 0) { 189 if (memnode_shift < 0) {
182 printk(KERN_ERR 190 printk(KERN_ERR
@@ -184,16 +192,10 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
184 bad_srat(); 192 bad_srat();
185 return -1; 193 return -1;
186 } 194 }
187 for (i = 0; i < MAX_NUMNODES; i++) { 195
188 if (!node_isset(i, nodes_parsed)) 196 /* Finally register nodes */
189 continue; 197 for_each_node_mask(i, nodes_parsed)
190 cutoff_node(i, start, end);
191 if (nodes[i].start == nodes[i].end) {
192 node_clear(i, nodes_parsed);
193 continue;
194 }
195 setup_node_bootmem(i, nodes[i].start, nodes[i].end); 198 setup_node_bootmem(i, nodes[i].start, nodes[i].end);
196 }
197 for (i = 0; i < NR_CPUS; i++) { 199 for (i = 0; i < NR_CPUS; i++) {
198 if (cpu_to_node[i] == NUMA_NO_NODE) 200 if (cpu_to_node[i] == NUMA_NO_NODE)
199 continue; 201 continue;