diff options
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/bigsmp/apic.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/es7000/apic.h | 16 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_apic.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/numaq/apic.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/summit/apic.h | 8 |
6 files changed, 18 insertions, 18 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h index 77f0b7348755..d0d894ff7d3e 100644 --- a/arch/x86/include/asm/bigsmp/apic.h +++ b/arch/x86/include/asm/bigsmp/apic.h | |||
@@ -82,7 +82,7 @@ static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) | |||
82 | 82 | ||
83 | extern u8 cpu_2_logical_apicid[]; | 83 | extern u8 cpu_2_logical_apicid[]; |
84 | /* Mapping from cpu number to logical apicid */ | 84 | /* Mapping from cpu number to logical apicid */ |
85 | static inline int cpu_to_logical_apicid(int cpu) | 85 | static inline int bigsmp_cpu_to_logical_apicid(int cpu) |
86 | { | 86 | { |
87 | if (cpu >= nr_cpu_ids) | 87 | if (cpu >= nr_cpu_ids) |
88 | return BAD_APICID; | 88 | return BAD_APICID; |
@@ -115,7 +115,7 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
115 | int apicid; | 115 | int apicid; |
116 | 116 | ||
117 | cpu = first_cpu(*cpumask); | 117 | cpu = first_cpu(*cpumask); |
118 | apicid = cpu_to_logical_apicid(cpu); | 118 | apicid = bigsmp_cpu_to_logical_apicid(cpu); |
119 | return apicid; | 119 | return apicid; |
120 | } | 120 | } |
121 | 121 | ||
@@ -132,7 +132,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
132 | if (cpumask_test_cpu(cpu, cpu_online_mask)) | 132 | if (cpumask_test_cpu(cpu, cpu_online_mask)) |
133 | break; | 133 | break; |
134 | if (cpu < nr_cpu_ids) | 134 | if (cpu < nr_cpu_ids) |
135 | return cpu_to_logical_apicid(cpu); | 135 | return bigsmp_cpu_to_logical_apicid(cpu); |
136 | 136 | ||
137 | return BAD_APICID; | 137 | return BAD_APICID; |
138 | } | 138 | } |
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h index bcdf31400dfa..e0cd07e74f98 100644 --- a/arch/x86/include/asm/es7000/apic.h +++ b/arch/x86/include/asm/es7000/apic.h | |||
@@ -109,7 +109,7 @@ static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) | |||
109 | 109 | ||
110 | extern u8 cpu_2_logical_apicid[]; | 110 | extern u8 cpu_2_logical_apicid[]; |
111 | /* Mapping from cpu number to logical apicid */ | 111 | /* Mapping from cpu number to logical apicid */ |
112 | static inline int cpu_to_logical_apicid(int cpu) | 112 | static inline int es7000_cpu_to_logical_apicid(int cpu) |
113 | { | 113 | { |
114 | #ifdef CONFIG_SMP | 114 | #ifdef CONFIG_SMP |
115 | if (cpu >= nr_cpu_ids) | 115 | if (cpu >= nr_cpu_ids) |
@@ -155,10 +155,10 @@ cpu_mask_to_apicid_cluster(const struct cpumask *cpumask) | |||
155 | * on the same apicid cluster return default value of target_cpus(): | 155 | * on the same apicid cluster return default value of target_cpus(): |
156 | */ | 156 | */ |
157 | cpu = cpumask_first(cpumask); | 157 | cpu = cpumask_first(cpumask); |
158 | apicid = cpu_to_logical_apicid(cpu); | 158 | apicid = es7000_cpu_to_logical_apicid(cpu); |
159 | while (cpus_found < num_bits_set) { | 159 | while (cpus_found < num_bits_set) { |
160 | if (cpumask_test_cpu(cpu, cpumask)) { | 160 | if (cpumask_test_cpu(cpu, cpumask)) { |
161 | int new_apicid = cpu_to_logical_apicid(cpu); | 161 | int new_apicid = es7000_cpu_to_logical_apicid(cpu); |
162 | if (apicid_cluster(apicid) != | 162 | if (apicid_cluster(apicid) != |
163 | apicid_cluster(new_apicid)){ | 163 | apicid_cluster(new_apicid)){ |
164 | printk ("%s: Not a valid mask!\n", __func__); | 164 | printk ("%s: Not a valid mask!\n", __func__); |
@@ -182,20 +182,20 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
182 | num_bits_set = cpus_weight(*cpumask); | 182 | num_bits_set = cpus_weight(*cpumask); |
183 | /* Return id to all */ | 183 | /* Return id to all */ |
184 | if (num_bits_set == nr_cpu_ids) | 184 | if (num_bits_set == nr_cpu_ids) |
185 | return cpu_to_logical_apicid(0); | 185 | return es7000_cpu_to_logical_apicid(0); |
186 | /* | 186 | /* |
187 | * The cpus in the mask must all be on the apic cluster. If are not | 187 | * The cpus in the mask must all be on the apic cluster. If are not |
188 | * on the same apicid cluster return default value of target_cpus(): | 188 | * on the same apicid cluster return default value of target_cpus(): |
189 | */ | 189 | */ |
190 | cpu = first_cpu(*cpumask); | 190 | cpu = first_cpu(*cpumask); |
191 | apicid = cpu_to_logical_apicid(cpu); | 191 | apicid = es7000_cpu_to_logical_apicid(cpu); |
192 | while (cpus_found < num_bits_set) { | 192 | while (cpus_found < num_bits_set) { |
193 | if (cpu_isset(cpu, *cpumask)) { | 193 | if (cpu_isset(cpu, *cpumask)) { |
194 | int new_apicid = cpu_to_logical_apicid(cpu); | 194 | int new_apicid = es7000_cpu_to_logical_apicid(cpu); |
195 | if (apicid_cluster(apicid) != | 195 | if (apicid_cluster(apicid) != |
196 | apicid_cluster(new_apicid)){ | 196 | apicid_cluster(new_apicid)){ |
197 | printk ("%s: Not a valid mask!\n", __func__); | 197 | printk ("%s: Not a valid mask!\n", __func__); |
198 | return cpu_to_logical_apicid(0); | 198 | return es7000_cpu_to_logical_apicid(0); |
199 | } | 199 | } |
200 | apicid = new_apicid; | 200 | apicid = new_apicid; |
201 | cpus_found++; | 201 | cpus_found++; |
@@ -209,7 +209,7 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
209 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask, | 209 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask, |
210 | const struct cpumask *andmask) | 210 | const struct cpumask *andmask) |
211 | { | 211 | { |
212 | int apicid = cpu_to_logical_apicid(0); | 212 | int apicid = es7000_cpu_to_logical_apicid(0); |
213 | cpumask_var_t cpumask; | 213 | cpumask_var_t cpumask; |
214 | 214 | ||
215 | if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC)) | 215 | if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC)) |
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h index 2f78209d972c..eae3e4b6ed04 100644 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ b/arch/x86/include/asm/mach-default/mach_apic.h | |||
@@ -105,7 +105,7 @@ static inline physid_mask_t default_ioapic_phys_id_map(physid_mask_t phys_map) | |||
105 | } | 105 | } |
106 | 106 | ||
107 | /* Mapping from cpu number to logical apicid */ | 107 | /* Mapping from cpu number to logical apicid */ |
108 | static inline int cpu_to_logical_apicid(int cpu) | 108 | static inline int default_cpu_to_logical_apicid(int cpu) |
109 | { | 109 | { |
110 | return 1 << cpu; | 110 | return 1 << cpu; |
111 | } | 111 | } |
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h index b585a8e5f816..2ea913e8e0d0 100644 --- a/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/arch/x86/include/asm/mach-generic/mach_apic.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm/genapic.h> | 4 | #include <asm/genapic.h> |
5 | 5 | ||
6 | #define cpu_to_logical_apicid (apic->cpu_to_logical_apicid) | ||
7 | #define cpu_present_to_apicid (apic->cpu_present_to_apicid) | 6 | #define cpu_present_to_apicid (apic->cpu_present_to_apicid) |
8 | #define apicid_to_cpu_present (apic->apicid_to_cpu_present) | 7 | #define apicid_to_cpu_present (apic->apicid_to_cpu_present) |
9 | #define setup_portio_remap (apic->setup_portio_remap) | 8 | #define setup_portio_remap (apic->setup_portio_remap) |
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h index a0e3b437118c..6989abd34853 100644 --- a/arch/x86/include/asm/numaq/apic.h +++ b/arch/x86/include/asm/numaq/apic.h | |||
@@ -56,7 +56,8 @@ static inline physid_mask_t numaq_ioapic_phys_id_map(physid_mask_t phys_map) | |||
56 | 56 | ||
57 | /* Mapping from cpu number to logical apicid */ | 57 | /* Mapping from cpu number to logical apicid */ |
58 | extern u8 cpu_2_logical_apicid[]; | 58 | extern u8 cpu_2_logical_apicid[]; |
59 | static inline int cpu_to_logical_apicid(int cpu) | 59 | |
60 | static inline int numaq_cpu_to_logical_apicid(int cpu) | ||
60 | { | 61 | { |
61 | if (cpu >= nr_cpu_ids) | 62 | if (cpu >= nr_cpu_ids) |
62 | return BAD_APICID; | 63 | return BAD_APICID; |
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h index cfff2760e60d..d564d7ee3f6c 100644 --- a/arch/x86/include/asm/summit/apic.h +++ b/arch/x86/include/asm/summit/apic.h | |||
@@ -85,7 +85,7 @@ static inline int summit_apicid_to_node(int logical_apicid) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | /* Mapping from cpu number to logical apicid */ | 87 | /* Mapping from cpu number to logical apicid */ |
88 | static inline int cpu_to_logical_apicid(int cpu) | 88 | static inline int summit_cpu_to_logical_apicid(int cpu) |
89 | { | 89 | { |
90 | #ifdef CONFIG_SMP | 90 | #ifdef CONFIG_SMP |
91 | if (cpu >= nr_cpu_ids) | 91 | if (cpu >= nr_cpu_ids) |
@@ -145,10 +145,10 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
145 | * on the same apicid cluster return default value of target_cpus(): | 145 | * on the same apicid cluster return default value of target_cpus(): |
146 | */ | 146 | */ |
147 | cpu = first_cpu(*cpumask); | 147 | cpu = first_cpu(*cpumask); |
148 | apicid = cpu_to_logical_apicid(cpu); | 148 | apicid = summit_cpu_to_logical_apicid(cpu); |
149 | while (cpus_found < num_bits_set) { | 149 | while (cpus_found < num_bits_set) { |
150 | if (cpu_isset(cpu, *cpumask)) { | 150 | if (cpu_isset(cpu, *cpumask)) { |
151 | int new_apicid = cpu_to_logical_apicid(cpu); | 151 | int new_apicid = summit_cpu_to_logical_apicid(cpu); |
152 | if (apicid_cluster(apicid) != | 152 | if (apicid_cluster(apicid) != |
153 | apicid_cluster(new_apicid)){ | 153 | apicid_cluster(new_apicid)){ |
154 | printk ("%s: Not a valid mask!\n", __func__); | 154 | printk ("%s: Not a valid mask!\n", __func__); |
@@ -165,7 +165,7 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
165 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask, | 165 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask, |
166 | const struct cpumask *andmask) | 166 | const struct cpumask *andmask) |
167 | { | 167 | { |
168 | int apicid = cpu_to_logical_apicid(0); | 168 | int apicid = summit_cpu_to_logical_apicid(0); |
169 | cpumask_var_t cpumask; | 169 | cpumask_var_t cpumask; |
170 | 170 | ||
171 | if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC)) | 171 | if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC)) |