aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/genx2apic_cluster.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/genx2apic_cluster.c')
-rw-r--r--arch/x86/kernel/genx2apic_cluster.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index fd8047f4e45..e7d16f53b9c 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -123,8 +123,8 @@ static unsigned int x2apic_cpu_mask_to_apicid(const cpumask_t *cpumask)
return BAD_APICID;
}
-static unsigned int x2apic_cpu_mask_to_apicid_and(const cpumask_t *cpumask,
- const cpumask_t *andmask)
+static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+ const struct cpumask *andmask)
{
int cpu;
@@ -132,9 +132,9 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const cpumask_t *cpumask,
* We're using fixed IRQ delivery, can only return one phys APIC ID.
* May as well be the first.
*/
- while ((cpu = next_cpu(-1, *cpumask)) < nr_cpu_ids)
- if (cpu_isset(cpu, *andmask))
- return per_cpu(x86_cpu_to_apicid, cpu);
+ cpu = cpumask_any_and(cpumask, andmask);
+ if (cpu < nr_cpu_ids)
+ return per_cpu(x86_cpu_to_apicid, cpu);
return BAD_APICID;
}