diff options
author | Mike Travis <travis@sgi.com> | 2008-03-25 18:06:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:34 -0400 |
commit | b447a468fcd130aa8951672b6115c673c274e888 (patch) | |
tree | 3824624df1191cb1e6abbf9f9dbeca3f9d8c17f8 /include/asm-x86 | |
parent | a24eae88ad3767d0a4a940a10e4a9cec849b7778 (diff) |
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>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/smp.h | 5 | ||||
-rw-r--r-- | include/asm-x86/topology.h | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index 654724c58f5b..d973c11688ce 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -29,10 +29,15 @@ extern int smp_num_siblings; | |||
29 | extern unsigned int num_processors; | 29 | extern unsigned int num_processors; |
30 | extern cpumask_t cpu_initialized; | 30 | extern cpumask_t cpu_initialized; |
31 | 31 | ||
32 | #ifdef CONFIG_SMP | ||
32 | extern u16 x86_cpu_to_apicid_init[]; | 33 | extern u16 x86_cpu_to_apicid_init[]; |
33 | extern u16 x86_bios_cpu_apicid_init[]; | 34 | extern u16 x86_bios_cpu_apicid_init[]; |
34 | extern void *x86_cpu_to_apicid_early_ptr; | 35 | extern void *x86_cpu_to_apicid_early_ptr; |
35 | extern void *x86_bios_cpu_apicid_early_ptr; | 36 | extern void *x86_bios_cpu_apicid_early_ptr; |
37 | #else | ||
38 | #define x86_cpu_to_apicid_early_ptr NULL | ||
39 | #define x86_bios_cpu_apicid_early_ptr NULL | ||
40 | #endif | ||
36 | 41 | ||
37 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 42 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); |
38 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); | 43 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); |
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h index 8d1a1f3d21b4..81a29eb08ac4 100644 --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h | |||
@@ -38,8 +38,13 @@ extern int cpu_to_node_map[]; | |||
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | DECLARE_PER_CPU(int, x86_cpu_to_node_map); | 40 | DECLARE_PER_CPU(int, x86_cpu_to_node_map); |
41 | |||
42 | #ifdef CONFIG_SMP | ||
41 | extern int x86_cpu_to_node_map_init[]; | 43 | extern int x86_cpu_to_node_map_init[]; |
42 | extern void *x86_cpu_to_node_map_early_ptr; | 44 | extern void *x86_cpu_to_node_map_early_ptr; |
45 | #else | ||
46 | #define x86_cpu_to_node_map_early_ptr NULL | ||
47 | #endif | ||
43 | 48 | ||
44 | extern cpumask_t node_to_cpumask_map[]; | 49 | extern cpumask_t node_to_cpumask_map[]; |
45 | 50 | ||
@@ -54,6 +59,8 @@ static inline int cpu_to_node(int cpu) | |||
54 | } | 59 | } |
55 | 60 | ||
56 | #else /* CONFIG_X86_64 */ | 61 | #else /* CONFIG_X86_64 */ |
62 | |||
63 | #ifdef CONFIG_SMP | ||
57 | static inline int early_cpu_to_node(int cpu) | 64 | static inline int early_cpu_to_node(int cpu) |
58 | { | 65 | { |
59 | int *cpu_to_node_map = x86_cpu_to_node_map_early_ptr; | 66 | 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) | |||
65 | else | 72 | else |
66 | return NUMA_NO_NODE; | 73 | return NUMA_NO_NODE; |
67 | } | 74 | } |
75 | #else | ||
76 | #define early_cpu_to_node(cpu) cpu_to_node(cpu) | ||
77 | #endif | ||
68 | 78 | ||
69 | static inline int cpu_to_node(int cpu) | 79 | static inline int cpu_to_node(int cpu) |
70 | { | 80 | { |
@@ -76,10 +86,7 @@ static inline int cpu_to_node(int cpu) | |||
76 | return ((int *)x86_cpu_to_node_map_early_ptr)[cpu]; | 86 | return ((int *)x86_cpu_to_node_map_early_ptr)[cpu]; |
77 | } | 87 | } |
78 | #endif | 88 | #endif |
79 | if (per_cpu_offset(cpu)) | 89 | return per_cpu(x86_cpu_to_node_map, cpu); |
80 | return per_cpu(x86_cpu_to_node_map, cpu); | ||
81 | else | ||
82 | return NUMA_NO_NODE; | ||
83 | } | 90 | } |
84 | #endif /* CONFIG_X86_64 */ | 91 | #endif /* CONFIG_X86_64 */ |
85 | 92 | ||