x86: clean up non-smp usage of cpu maps
Cleanup references to the early cpu maps for the non-SMP configuration and remove some functions called for SMP configurations only. Cc: Andi Kleen <ak@suse.de> Cc: Christoph Lameter <clameter@sgi.com> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -38,8 +38,13 @@ extern int cpu_to_node_map[];
|
||||
#endif
|
||||
|
||||
DECLARE_PER_CPU(int, x86_cpu_to_node_map);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
extern int x86_cpu_to_node_map_init[];
|
||||
extern void *x86_cpu_to_node_map_early_ptr;
|
||||
#else
|
||||
#define x86_cpu_to_node_map_early_ptr NULL
|
||||
#endif
|
||||
|
||||
extern cpumask_t node_to_cpumask_map[];
|
||||
|
||||
@@ -54,6 +59,8 @@ static inline int cpu_to_node(int cpu)
|
||||
}
|
||||
|
||||
#else /* CONFIG_X86_64 */
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static inline int early_cpu_to_node(int cpu)
|
||||
{
|
||||
int *cpu_to_node_map = x86_cpu_to_node_map_early_ptr;
|
||||
@@ -65,6 +72,9 @@ static inline int early_cpu_to_node(int cpu)
|
||||
else
|
||||
return NUMA_NO_NODE;
|
||||
}
|
||||
#else
|
||||
#define early_cpu_to_node(cpu) cpu_to_node(cpu)
|
||||
#endif
|
||||
|
||||
static inline int cpu_to_node(int cpu)
|
||||
{
|
||||
@@ -76,10 +86,7 @@ static inline int cpu_to_node(int cpu)
|
||||
return ((int *)x86_cpu_to_node_map_early_ptr)[cpu];
|
||||
}
|
||||
#endif
|
||||
if (per_cpu_offset(cpu))
|
||||
return per_cpu(x86_cpu_to_node_map, cpu);
|
||||
else
|
||||
return NUMA_NO_NODE;
|
||||
return per_cpu(x86_cpu_to_node_map, cpu);
|
||||
}
|
||||
#endif /* CONFIG_X86_64 */
|
||||
|
||||
|
Reference in New Issue
Block a user