]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/genapic_flat_64.c
x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / genapic_flat_64.c
index 7fa5f49c2ddac015b8aa7bc4f132b60793efba2a..34185488e4fb47e41aed797bcd8cd6b1a5c9d33d 100644 (file)
@@ -276,7 +276,9 @@ physflat_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;