]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/include/asm/bigsmp/apic.h
x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
[linux-2.6-omap-h63xx.git] / arch / x86 / include / asm / bigsmp / apic.h
index 976399debb3f1511a6b2c8faedf26c491fc97ce1..d8dd9f537911fb2a6e98f5c7d68cd2121cfd6ecc 100644 (file)
@@ -138,7 +138,9 @@ static inline unsigned int 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 cpu_to_logical_apicid(cpu);