Skip to content

Commit

Permalink
x86: early cpu_to_node fix in numa_64.c
Browse files Browse the repository at this point in the history
Both of these references to cpu_to_node() can potentially occur
before the "late" cpu_to_node map is setup.  Therefore, they
should be changed to use early_cpu_to_node().

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
travis@sgi.com authored and Ingo Molnar committed Jan 30, 2008
1 parent e6c4dc6 commit 1ce3571
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/mm/numa_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void __init numa_init_array(void)

rr = first_node(node_online_map);
for (i = 0; i < NR_CPUS; i++) {
if (cpu_to_node(i) != NUMA_NO_NODE)
if (early_cpu_to_node(i) != NUMA_NO_NODE)
continue;
numa_set_node(i, rr);
rr = next_node(rr, node_online_map);
Expand Down Expand Up @@ -528,7 +528,8 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)

__cpuinit void numa_add_cpu(int cpu)
{
set_bit(cpu, (unsigned long *)&node_to_cpumask_map[cpu_to_node(cpu)]);
set_bit(cpu,
(unsigned long *)&node_to_cpumask_map[early_cpu_to_node(cpu)]);
}

void __cpuinit numa_set_node(int cpu, int node)
Expand Down

0 comments on commit 1ce3571

Please sign in to comment.