diff options
Diffstat (limited to 'arch/x86/mm/srat_64.c')
-rw-r--r-- | arch/x86/mm/srat_64.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 5c0637e4c2f4..b367bc342fe0 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -130,6 +130,9 @@ void __init | |||
130 | acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) | 130 | acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) |
131 | { | 131 | { |
132 | int pxm, node; | 132 | int pxm, node; |
133 | int apic_id; | ||
134 | |||
135 | apic_id = pa->apic_id; | ||
133 | if (srat_disabled()) | 136 | if (srat_disabled()) |
134 | return; | 137 | return; |
135 | if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) { | 138 | if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) { |
@@ -145,10 +148,10 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) | |||
145 | bad_srat(); | 148 | bad_srat(); |
146 | return; | 149 | return; |
147 | } | 150 | } |
148 | apicid_to_node[pa->apic_id] = node; | 151 | apicid_to_node[apic_id] = node; |
149 | acpi_numa = 1; | 152 | acpi_numa = 1; |
150 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", | 153 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", |
151 | pxm, pa->apic_id, node); | 154 | pxm, apic_id, node); |
152 | } | 155 | } |
153 | 156 | ||
154 | int update_end_of_memory(unsigned long end) {return -1;} | 157 | int update_end_of_memory(unsigned long end) {return -1;} |
@@ -343,7 +346,8 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
343 | /* First clean up the node list */ | 346 | /* First clean up the node list */ |
344 | for (i = 0; i < MAX_NUMNODES; i++) { | 347 | for (i = 0; i < MAX_NUMNODES; i++) { |
345 | cutoff_node(i, start, end); | 348 | cutoff_node(i, start, end); |
346 | if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) { | 349 | /* ZZZ why was this needed. At least add a comment */ |
350 | if (nodes[i].end && (nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) { | ||
347 | unparse_node(i); | 351 | unparse_node(i); |
348 | node_set_offline(i); | 352 | node_set_offline(i); |
349 | } | 353 | } |
@@ -384,6 +388,12 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
384 | } | 388 | } |
385 | 389 | ||
386 | #ifdef CONFIG_NUMA_EMU | 390 | #ifdef CONFIG_NUMA_EMU |
391 | static int fake_node_to_pxm_map[MAX_NUMNODES] __initdata = { | ||
392 | [0 ... MAX_NUMNODES-1] = PXM_INVAL | ||
393 | }; | ||
394 | static unsigned char fake_apicid_to_node[MAX_LOCAL_APIC] __initdata = { | ||
395 | [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE | ||
396 | }; | ||
387 | static int __init find_node_by_addr(unsigned long addr) | 397 | static int __init find_node_by_addr(unsigned long addr) |
388 | { | 398 | { |
389 | int ret = NUMA_NO_NODE; | 399 | int ret = NUMA_NO_NODE; |
@@ -414,12 +424,6 @@ static int __init find_node_by_addr(unsigned long addr) | |||
414 | void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes) | 424 | void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes) |
415 | { | 425 | { |
416 | int i, j; | 426 | int i, j; |
417 | int fake_node_to_pxm_map[MAX_NUMNODES] = { | ||
418 | [0 ... MAX_NUMNODES-1] = PXM_INVAL | ||
419 | }; | ||
420 | unsigned char fake_apicid_to_node[MAX_LOCAL_APIC] = { | ||
421 | [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE | ||
422 | }; | ||
423 | 427 | ||
424 | printk(KERN_INFO "Faking PXM affinity for fake nodes on real " | 428 | printk(KERN_INFO "Faking PXM affinity for fake nodes on real " |
425 | "topology.\n"); | 429 | "topology.\n"); |