x86/IO-APIC: adjust setting of destinations

setup_IO_APIC_irqs() runs before APs get brought up, so using
desc->arch.cpu_mask as best risks it being either empty or having bits
for CPUs other than the BP set. Just use the APIC ID of the only
online CPU directly.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2015-11-16 13:11:59 +01:00
1 parent fc0c3fa2ad
commit a85da715cf
1 file changed
+1 -1
+1 -1
View File
@@ -1039,7 +1039,7 @@ static void __init setup_IO_APIC_irqs(void)
disable_8259A_irq(irq_to_desc(irq));
desc = irq_to_desc(irq);
SET_DEST(entry, logical, cpu_mask_to_apicid(desc->arch.cpu_mask));
SET_DEST(entry, logical, get_apic_id());
spin_lock_irqsave(&ioapic_lock, flags);
__ioapic_write_entry(apic, pin, 0, entry);
set_native_irq_info(irq, TARGET_CPUS);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.