diff options
Diffstat (limited to 'arch/x86')
-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 1fec0f9b1508..9043251210fb 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -3755,7 +3755,9 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | |||
3755 | void __init setup_ioapic_dest(void) | 3755 | void __init setup_ioapic_dest(void) |
3756 | { | 3756 | { |
3757 | int pin, ioapic, irq, irq_entry; | 3757 | int pin, ioapic, irq, irq_entry; |
3758 | struct irq_desc *desc; | ||
3758 | struct irq_cfg *cfg; | 3759 | struct irq_cfg *cfg; |
3760 | cpumask_t mask; | ||
3759 | 3761 | ||
3760 | if (skip_ioapic_setup == 1) | 3762 | if (skip_ioapic_setup == 1) |
3761 | return; | 3763 | return; |
@@ -3772,16 +3774,30 @@ void __init setup_ioapic_dest(void) | |||
3772 | * cpu is online. | 3774 | * cpu is online. |
3773 | */ | 3775 | */ |
3774 | cfg = irq_cfg(irq); | 3776 | cfg = irq_cfg(irq); |
3775 | if (!cfg->vector) | 3777 | if (!cfg->vector) { |
3776 | setup_IO_APIC_irq(ioapic, pin, irq, | 3778 | setup_IO_APIC_irq(ioapic, pin, irq, |
3777 | irq_trigger(irq_entry), | 3779 | irq_trigger(irq_entry), |
3778 | irq_polarity(irq_entry)); | 3780 | irq_polarity(irq_entry)); |
3781 | continue; | ||
3782 | |||
3783 | } | ||
3784 | |||
3785 | /* | ||
3786 | * Honour affinities which have been set in early boot | ||
3787 | */ | ||
3788 | desc = irq_to_desc(irq); | ||
3789 | if (desc->status & | ||
3790 | (IRQ_NO_BALANCING | IRQ_AFFINITY_SET)) | ||
3791 | mask = desc->affinity; | ||
3792 | else | ||
3793 | mask = TARGET_CPUS; | ||
3794 | |||
3779 | #ifdef CONFIG_INTR_REMAP | 3795 | #ifdef CONFIG_INTR_REMAP |
3780 | else if (intr_remapping_enabled) | 3796 | if (intr_remapping_enabled) |
3781 | set_ir_ioapic_affinity_irq(irq, TARGET_CPUS); | 3797 | set_ir_ioapic_affinity_irq(irq, mask); |
3782 | #endif | ||
3783 | else | 3798 | else |
3784 | set_ioapic_affinity_irq(irq, TARGET_CPUS); | 3799 | #endif |
3800 | set_ioapic_affinity_irq(irq, mask); | ||
3785 | } | 3801 | } |
3786 | 3802 | ||
3787 | } | 3803 | } |