diff options
Diffstat (limited to 'arch/x86/mm/srat_64.c')
| -rw-r--r-- | arch/x86/mm/srat_64.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 9d7ce96e5a5c..d89075489664 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
| @@ -290,8 +290,6 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) | |||
| 290 | 290 | ||
| 291 | printk(KERN_INFO "SRAT: Node %u PXM %u %lx-%lx\n", node, pxm, | 291 | printk(KERN_INFO "SRAT: Node %u PXM %u %lx-%lx\n", node, pxm, |
| 292 | start, end); | 292 | start, end); |
| 293 | e820_register_active_regions(node, start >> PAGE_SHIFT, | ||
| 294 | end >> PAGE_SHIFT); | ||
| 295 | 293 | ||
| 296 | if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) { | 294 | if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) { |
| 297 | update_nodes_add(node, start, end); | 295 | update_nodes_add(node, start, end); |
| @@ -338,6 +336,19 @@ static int __init nodes_cover_memory(const struct bootnode *nodes) | |||
| 338 | 336 | ||
| 339 | void __init acpi_numa_arch_fixup(void) {} | 337 | void __init acpi_numa_arch_fixup(void) {} |
| 340 | 338 | ||
| 339 | int __init acpi_get_nodes(struct bootnode *physnodes) | ||
| 340 | { | ||
| 341 | int i; | ||
| 342 | int ret = 0; | ||
| 343 | |||
| 344 | for_each_node_mask(i, nodes_parsed) { | ||
| 345 | physnodes[ret].start = nodes[i].start; | ||
| 346 | physnodes[ret].end = nodes[i].end; | ||
| 347 | ret++; | ||
| 348 | } | ||
| 349 | return ret; | ||
| 350 | } | ||
| 351 | |||
| 341 | /* Use the information discovered above to actually set up the nodes. */ | 352 | /* Use the information discovered above to actually set up the nodes. */ |
| 342 | int __init acpi_scan_nodes(unsigned long start, unsigned long end) | 353 | int __init acpi_scan_nodes(unsigned long start, unsigned long end) |
| 343 | { | 354 | { |
| @@ -350,11 +361,6 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
| 350 | for (i = 0; i < MAX_NUMNODES; i++) | 361 | for (i = 0; i < MAX_NUMNODES; i++) |
| 351 | cutoff_node(i, start, end); | 362 | cutoff_node(i, start, end); |
| 352 | 363 | ||
| 353 | if (!nodes_cover_memory(nodes)) { | ||
| 354 | bad_srat(); | ||
| 355 | return -1; | ||
| 356 | } | ||
| 357 | |||
| 358 | memnode_shift = compute_hash_shift(node_memblk_range, num_node_memblks, | 364 | memnode_shift = compute_hash_shift(node_memblk_range, num_node_memblks, |
| 359 | memblk_nodeid); | 365 | memblk_nodeid); |
| 360 | if (memnode_shift < 0) { | 366 | if (memnode_shift < 0) { |
| @@ -364,6 +370,14 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
| 364 | return -1; | 370 | return -1; |
| 365 | } | 371 | } |
| 366 | 372 | ||
| 373 | for_each_node_mask(i, nodes_parsed) | ||
| 374 | e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT, | ||
| 375 | nodes[i].end >> PAGE_SHIFT); | ||
| 376 | if (!nodes_cover_memory(nodes)) { | ||
| 377 | bad_srat(); | ||
| 378 | return -1; | ||
| 379 | } | ||
| 380 | |||
| 367 | /* Account for nodes with cpus and no memory */ | 381 | /* Account for nodes with cpus and no memory */ |
| 368 | nodes_or(node_possible_map, nodes_parsed, cpu_nodes_parsed); | 382 | nodes_or(node_possible_map, nodes_parsed, cpu_nodes_parsed); |
| 369 | 383 | ||
| @@ -454,7 +468,6 @@ void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes) | |||
| 454 | for (i = 0; i < num_nodes; i++) | 468 | for (i = 0; i < num_nodes; i++) |
| 455 | if (fake_nodes[i].start != fake_nodes[i].end) | 469 | if (fake_nodes[i].start != fake_nodes[i].end) |
| 456 | node_set(i, nodes_parsed); | 470 | node_set(i, nodes_parsed); |
| 457 | WARN_ON(!nodes_cover_memory(fake_nodes)); | ||
| 458 | } | 471 | } |
| 459 | 472 | ||
| 460 | static int null_slit_node_compare(int a, int b) | 473 | static int null_slit_node_compare(int a, int b) |
