diff options
Diffstat (limited to 'arch/x86/mm/srat_64.c')
-rw-r--r-- | arch/x86/mm/srat_64.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 99649dccad28..1b4763e26ea9 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -100,7 +100,19 @@ static __init inline int srat_disabled(void) | |||
100 | /* Callback for SLIT parsing */ | 100 | /* Callback for SLIT parsing */ |
101 | void __init acpi_numa_slit_init(struct acpi_table_slit *slit) | 101 | void __init acpi_numa_slit_init(struct acpi_table_slit *slit) |
102 | { | 102 | { |
103 | acpi_slit = slit; | 103 | unsigned length; |
104 | unsigned long phys; | ||
105 | |||
106 | length = slit->header.length; | ||
107 | phys = find_e820_area(0, max_pfn_mapped<<PAGE_SHIFT, length, | ||
108 | PAGE_SIZE); | ||
109 | |||
110 | if (phys == -1L) | ||
111 | panic(" Can not save slit!\n"); | ||
112 | |||
113 | acpi_slit = __va(phys); | ||
114 | memcpy(acpi_slit, slit, length); | ||
115 | reserve_early(phys, phys + length, "ACPI SLIT"); | ||
104 | } | 116 | } |
105 | 117 | ||
106 | /* Callback for Proximity Domain -> LAPIC mapping */ | 118 | /* Callback for Proximity Domain -> LAPIC mapping */ |
@@ -299,7 +311,7 @@ static int __init nodes_cover_memory(const struct bootnode *nodes) | |||
299 | pxmram = 0; | 311 | pxmram = 0; |
300 | } | 312 | } |
301 | 313 | ||
302 | e820ram = end_pfn - absent_pages_in_range(0, end_pfn); | 314 | e820ram = max_pfn - absent_pages_in_range(0, max_pfn); |
303 | /* We seem to lose 3 pages somewhere. Allow a bit of slack. */ | 315 | /* We seem to lose 3 pages somewhere. Allow a bit of slack. */ |
304 | if ((long)(e820ram - pxmram) >= 1*1024*1024) { | 316 | if ((long)(e820ram - pxmram) >= 1*1024*1024) { |
305 | printk(KERN_ERR | 317 | printk(KERN_ERR |
@@ -376,7 +388,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
376 | if (node == NUMA_NO_NODE) | 388 | if (node == NUMA_NO_NODE) |
377 | continue; | 389 | continue; |
378 | if (!node_isset(node, node_possible_map)) | 390 | if (!node_isset(node, node_possible_map)) |
379 | numa_set_node(i, NUMA_NO_NODE); | 391 | numa_clear_node(i); |
380 | } | 392 | } |
381 | numa_init_array(); | 393 | numa_init_array(); |
382 | return 0; | 394 | return 0; |
@@ -495,6 +507,7 @@ int __node_distance(int a, int b) | |||
495 | 507 | ||
496 | EXPORT_SYMBOL(__node_distance); | 508 | EXPORT_SYMBOL(__node_distance); |
497 | 509 | ||
510 | #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) | ||
498 | int memory_add_physaddr_to_nid(u64 start) | 511 | int memory_add_physaddr_to_nid(u64 start) |
499 | { | 512 | { |
500 | int i, ret = 0; | 513 | int i, ret = 0; |
@@ -506,4 +519,4 @@ int memory_add_physaddr_to_nid(u64 start) | |||
506 | return ret; | 519 | return ret; |
507 | } | 520 | } |
508 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); | 521 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); |
509 | 522 | #endif | |