summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/bigsmp/apic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/bigsmp/apic.h')
-rw-r--r--arch/x86/include/asm/bigsmp/apic.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 976399d..d8dd9f5 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -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);
OpenPOWER on IntegriCloud