aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/genx2apic_phys.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/genx2apic_phys.c')
-rw-r--r--arch/x86/kernel/genx2apic_phys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index b255507884f2..62895cf315ff 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -132,7 +132,9 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *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 cpu = cpumask_any_and(cpumask, andmask); 135 for_each_cpu_and(cpu, cpumask, andmask)
136 if (cpumask_test_cpu(cpu, cpu_online_mask))
137 break;
136 if (cpu < nr_cpu_ids) 138 if (cpu < nr_cpu_ids)
137 return per_cpu(x86_cpu_to_apicid, cpu); 139 return per_cpu(x86_cpu_to_apicid, cpu);
138 return BAD_APICID; 140 return BAD_APICID;