aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/genx2apic_uv_x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/genx2apic_uv_x.c')
-rw-r--r--arch/x86/kernel/genx2apic_uv_x.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 010659415ae4..53bd2570272c 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -179,6 +179,21 @@ static unsigned int uv_cpu_mask_to_apicid(const cpumask_t *cpumask)
179 return BAD_APICID; 179 return BAD_APICID;
180} 180}
181 181
182static unsigned int uv_cpu_mask_to_apicid_and(const cpumask_t *cpumask,
183 const cpumask_t *andmask)
184{
185 int cpu;
186
187 /*
188 * We're using fixed IRQ delivery, can only return one phys APIC ID.
189 * May as well be the first.
190 */
191 while ((cpu = next_cpu(-1, *cpumask)) < nr_cpu_ids)
192 if (cpu_isset(cpu, *andmask))
193 return per_cpu(x86_cpu_to_apicid, cpu);
194 return BAD_APICID;
195}
196
182static unsigned int get_apic_id(unsigned long x) 197static unsigned int get_apic_id(unsigned long x)
183{ 198{
184 unsigned int id; 199 unsigned int id;
@@ -229,6 +244,7 @@ struct genapic apic_x2apic_uv_x = {
229 .send_IPI_mask_allbutself = uv_send_IPI_mask_allbutself, 244 .send_IPI_mask_allbutself = uv_send_IPI_mask_allbutself,
230 .send_IPI_self = uv_send_IPI_self, 245 .send_IPI_self = uv_send_IPI_self,
231 .cpu_mask_to_apicid = uv_cpu_mask_to_apicid, 246 .cpu_mask_to_apicid = uv_cpu_mask_to_apicid,
247 .cpu_mask_to_apicid_and = uv_cpu_mask_to_apicid_and,
232 .phys_pkg_id = phys_pkg_id, 248 .phys_pkg_id = phys_pkg_id,
233 .get_apic_id = get_apic_id, 249 .get_apic_id = get_apic_id,
234 .set_apic_id = set_apic_id, 250 .set_apic_id = set_apic_id,