aboutsummaryrefslogtreecommitdiffstats
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 fd8047f4e455..e7d16f53b9cd 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)
123 return BAD_APICID; 123 return BAD_APICID;
124} 124}
125 125
126static unsigned int x2apic_cpu_mask_to_apicid_and(const cpumask_t *cpumask, 126static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
127 const cpumask_t *andmask) 127 const struct cpumask *andmask)
128{ 128{
129 int cpu; 129 int cpu;
130 130
@@ -132,9 +132,9 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const cpumask_t *cpumask,
132 * We're using fixed IRQ delivery, can only return one phys APIC ID. 132 * We're using fixed IRQ delivery, can only return one phys APIC ID.
133 * May as well be the first. 133 * May as well be the first.
134 */ 134 */
135 while ((cpu = next_cpu(-1, *cpumask)) < nr_cpu_ids) 135 cpu = cpumask_any_and(cpumask, andmask);
136 if (cpu_isset(cpu, *andmask)) 136 if (cpu < nr_cpu_ids)
137 return per_cpu(x86_cpu_to_apicid, cpu); 137 return per_cpu(x86_cpu_to_apicid, cpu);
138 return BAD_APICID; 138 return BAD_APICID;
139} 139}
140 140