summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/bigsmp/apic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/bigsmp/apic.h')
-rw-r--r--arch/x86/include/asm/bigsmp/apic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 99f9abacf6a2..976399debb3f 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -129,8 +129,8 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
return apicid;
}
-static inline unsigned int cpu_mask_to_apicid_and(const cpumask_t *cpumask,
- const cpumask_t *andmask)
+static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+ const struct cpumask *andmask)
{
int cpu;
@@ -138,9 +138,9 @@ static inline unsigned int 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 cpu_to_logical_apicid(cpu);
+ cpu = cpumask_any_and(cpumask, andmask);
+ if (cpu < nr_cpu_ids)
+ return cpu_to_logical_apicid(cpu);
return BAD_APICID;
}