aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/srat_64.c
diff options
context:
space:
mode:
authortravis@sgi.com <travis@sgi.com>2008-01-30 07:33:21 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:21 -0500
commit834beda15ecc43c110c0a6ac39ec1aa79f891716 (patch)
tree56f00ac3e1b06083c5be928dc740369a022b76fa /arch/x86/mm/srat_64.c
parentac72e7888a612dccfbc15b34698aad441bdfda10 (diff)
x86: change NR_CPUS arrays in numa_64 fixup
Change the following static arrays sized by NR_CPUS to per_cpu data variables: char cpu_to_node_map[NR_CPUS]; fixup: - Split cpu_to_node function into "early" and "late" versions so that x86_cpu_to_node_map_early_ptr is not EXPORT'ed and the cpu_to_node inline function is more streamlined. - This also involves setting up the percpu maps as early as possible. - Fix X86_32 NUMA build errors that previous version of this patch caused. V2->V3: - add early_cpu_to_node function to keep cpu_to_node efficient - move and rename smp_set_apicids() to setup_percpu_maps() - call setup_percpu_maps() as early as possible V1->V2: - Removed extraneous casts - Fix !NUMA builds with '#ifdef CONFIG_NUMA" Signed-off-by: Mike Travis <travis@sgi.com> Reviewed-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/srat_64.c')
-rw-r--r--arch/x86/mm/srat_64.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index e5a1ec8342dc..04cbecaeca81 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -382,9 +382,10 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
382 setup_node_bootmem(i, nodes[i].start, nodes[i].end); 382 setup_node_bootmem(i, nodes[i].start, nodes[i].end);
383 383
384 for (i = 0; i < NR_CPUS; i++) { 384 for (i = 0; i < NR_CPUS; i++) {
385 if (cpu_to_node(i) == NUMA_NO_NODE) 385 int node = cpu_to_node(i);
386 if (node == NUMA_NO_NODE)
386 continue; 387 continue;
387 if (!node_isset(cpu_to_node(i), node_possible_map)) 388 if (!node_isset(node, node_possible_map))
388 numa_set_node(i, NUMA_NO_NODE); 389 numa_set_node(i, NUMA_NO_NODE);
389 } 390 }
390 numa_init_array(); 391 numa_init_array();