]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/genx2apic_uv_x.c
x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / genx2apic_uv_x.c
index 3984682cd84976b06a15c695f199116b130ed33c..0e88be11227df8cc0e9b72f4eb74af2928fffb16 100644 (file)
@@ -188,7 +188,9 @@ static unsigned int uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
-       cpu = cpumask_any_and(cpumask, andmask);
+       for_each_cpu_and(cpu, cpumask, andmask)
+               if (cpumask_test_cpu(cpu, cpu_online_mask))
+                       break;
        if (cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_apicid, cpu);
        return BAD_APICID;