diff options
Diffstat (limited to 'arch/x86/kernel/genx2apic_cluster.c')
-rw-r--r-- | arch/x86/kernel/genx2apic_cluster.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c index 4716a0c9f936..d451c9b9fdff 100644 --- a/arch/x86/kernel/genx2apic_cluster.c +++ b/arch/x86/kernel/genx2apic_cluster.c | |||
@@ -133,7 +133,9 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
133 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | 133 | * We're using fixed IRQ delivery, can only return one phys APIC ID. |
134 | * May as well be the first. | 134 | * May as well be the first. |
135 | */ | 135 | */ |
136 | cpu = cpumask_any_and(cpumask, andmask); | 136 | for_each_cpu_and(cpu, cpumask, andmask) |
137 | if (cpumask_test_cpu(cpu, cpu_online_mask)) | ||
138 | break; | ||
137 | if (cpu < nr_cpu_ids) | 139 | if (cpu < nr_cpu_ids) |
138 | return per_cpu(x86_cpu_to_apicid, cpu); | 140 | return per_cpu(x86_cpu_to_apicid, cpu); |
139 | return BAD_APICID; | 141 | return BAD_APICID; |