diff options
-rw-r--r-- | arch/x86/kernel/io_apic.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index 7a3f2028e2eb..988ee89467d3 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -3761,7 +3761,9 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | |||
3761 | void __init setup_ioapic_dest(void) | 3761 | void __init setup_ioapic_dest(void) |
3762 | { | 3762 | { |
3763 | int pin, ioapic, irq, irq_entry; | 3763 | int pin, ioapic, irq, irq_entry; |
3764 | struct irq_desc *desc; | ||
3764 | struct irq_cfg *cfg; | 3765 | struct irq_cfg *cfg; |
3766 | cpumask_t mask; | ||
3765 | 3767 | ||
3766 | if (skip_ioapic_setup == 1) | 3768 | if (skip_ioapic_setup == 1) |
3767 | return; | 3769 | return; |
@@ -3778,16 +3780,30 @@ void __init setup_ioapic_dest(void) | |||
3778 | * cpu is online. | 3780 | * cpu is online. |
3779 | */ | 3781 | */ |
3780 | cfg = irq_cfg(irq); | 3782 | cfg = irq_cfg(irq); |
3781 | if (!cfg->vector) | 3783 | if (!cfg->vector) { |
3782 | setup_IO_APIC_irq(ioapic, pin, irq, | 3784 | setup_IO_APIC_irq(ioapic, pin, irq, |
3783 | irq_trigger(irq_entry), | 3785 | irq_trigger(irq_entry), |
3784 | irq_polarity(irq_entry)); | 3786 | irq_polarity(irq_entry)); |
3787 | continue; | ||
3788 | |||
3789 | } | ||
3790 | |||
3791 | /* | ||
3792 | * Honour affinities which have been set in early boot | ||
3793 | */ | ||
3794 | desc = irq_to_desc(irq); | ||
3795 | if (desc->status & | ||
3796 | (IRQ_NO_BALANCING | IRQ_AFFINITY_SET)) | ||
3797 | mask = desc->affinity; | ||
3798 | else | ||
3799 | mask = TARGET_CPUS; | ||
3800 | |||
3785 | #ifdef CONFIG_INTR_REMAP | 3801 | #ifdef CONFIG_INTR_REMAP |
3786 | else if (intr_remapping_enabled) | 3802 | if (intr_remapping_enabled) |
3787 | set_ir_ioapic_affinity_irq(irq, TARGET_CPUS); | 3803 | set_ir_ioapic_affinity_irq(irq, mask); |
3788 | #endif | ||
3789 | else | 3804 | else |
3790 | set_ioapic_affinity_irq(irq, TARGET_CPUS); | 3805 | #endif |
3806 | set_ioapic_affinity_irq(irq, mask); | ||
3791 | } | 3807 | } |
3792 | 3808 | ||
3793 | } | 3809 | } |