aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/apic_numachip.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apic/apic_numachip.c')
-rw-r--r--arch/x86/kernel/apic/apic_numachip.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/arch/x86/kernel/apic/apic_numachip.c b/arch/x86/kernel/apic/apic_numachip.c
index 3255a60fcc95..dba4bf2ed566 100644
--- a/arch/x86/kernel/apic/apic_numachip.c
+++ b/arch/x86/kernel/apic/apic_numachip.c
@@ -152,38 +152,6 @@ static void numachip_send_IPI_self(int vector)
152 __default_send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL); 152 __default_send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL);
153} 153}
154 154
155static unsigned int numachip_cpu_mask_to_apicid(const struct cpumask *cpumask)
156{
157 int cpu;
158
159 /*
160 * We're using fixed IRQ delivery, can only return one phys APIC ID.
161 * May as well be the first.
162 */
163 cpu = cpumask_first(cpumask);
164 if (likely((unsigned)cpu < nr_cpu_ids))
165 return per_cpu(x86_cpu_to_apicid, cpu);
166
167 return BAD_APICID;
168}
169
170static unsigned int
171numachip_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
172 const struct cpumask *andmask)
173{
174 int cpu;
175
176 /*
177 * We're using fixed IRQ delivery, can only return one phys APIC ID.
178 * May as well be the first.
179 */
180 for_each_cpu_and(cpu, cpumask, andmask) {
181 if (cpumask_test_cpu(cpu, cpu_online_mask))
182 break;
183 }
184 return per_cpu(x86_cpu_to_apicid, cpu);
185}
186
187static int __init numachip_probe(void) 155static int __init numachip_probe(void)
188{ 156{
189 return apic == &apic_numachip; 157 return apic == &apic_numachip;
@@ -272,8 +240,8 @@ static struct apic apic_numachip __refconst = {
272 .set_apic_id = set_apic_id, 240 .set_apic_id = set_apic_id,
273 .apic_id_mask = 0xffU << 24, 241 .apic_id_mask = 0xffU << 24,
274 242
275 .cpu_mask_to_apicid = numachip_cpu_mask_to_apicid, 243 .cpu_mask_to_apicid = default_cpu_mask_to_apicid,
276 .cpu_mask_to_apicid_and = numachip_cpu_mask_to_apicid_and, 244 .cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and,
277 245
278 .send_IPI_mask = numachip_send_IPI_mask, 246 .send_IPI_mask = numachip_send_IPI_mask,
279 .send_IPI_mask_allbutself = numachip_send_IPI_mask_allbutself, 247 .send_IPI_mask_allbutself = numachip_send_IPI_mask_allbutself,