aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/io_apic.c')
-rw-r--r--arch/x86/kernel/io_apic.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 1fec0f9b1508..679e7bbbbcd6 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -2216,10 +2216,9 @@ static void set_ir_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
2216asmlinkage void smp_irq_move_cleanup_interrupt(void) 2216asmlinkage void smp_irq_move_cleanup_interrupt(void)
2217{ 2217{
2218 unsigned vector, me; 2218 unsigned vector, me;
2219
2219 ack_APIC_irq(); 2220 ack_APIC_irq();
2220#ifdef CONFIG_X86_64
2221 exit_idle(); 2221 exit_idle();
2222#endif
2223 irq_enter(); 2222 irq_enter();
2224 2223
2225 me = smp_processor_id(); 2224 me = smp_processor_id();
@@ -3755,7 +3754,9 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
3755void __init setup_ioapic_dest(void) 3754void __init setup_ioapic_dest(void)
3756{ 3755{
3757 int pin, ioapic, irq, irq_entry; 3756 int pin, ioapic, irq, irq_entry;
3757 struct irq_desc *desc;
3758 struct irq_cfg *cfg; 3758 struct irq_cfg *cfg;
3759 cpumask_t mask;
3759 3760
3760 if (skip_ioapic_setup == 1) 3761 if (skip_ioapic_setup == 1)
3761 return; 3762 return;
@@ -3772,16 +3773,30 @@ void __init setup_ioapic_dest(void)
3772 * cpu is online. 3773 * cpu is online.
3773 */ 3774 */
3774 cfg = irq_cfg(irq); 3775 cfg = irq_cfg(irq);
3775 if (!cfg->vector) 3776 if (!cfg->vector) {
3776 setup_IO_APIC_irq(ioapic, pin, irq, 3777 setup_IO_APIC_irq(ioapic, pin, irq,
3777 irq_trigger(irq_entry), 3778 irq_trigger(irq_entry),
3778 irq_polarity(irq_entry)); 3779 irq_polarity(irq_entry));
3780 continue;
3781
3782 }
3783
3784 /*
3785 * Honour affinities which have been set in early boot
3786 */
3787 desc = irq_to_desc(irq);
3788 if (desc->status &
3789 (IRQ_NO_BALANCING | IRQ_AFFINITY_SET))
3790 mask = desc->affinity;
3791 else
3792 mask = TARGET_CPUS;
3793
3779#ifdef CONFIG_INTR_REMAP 3794#ifdef CONFIG_INTR_REMAP
3780 else if (intr_remapping_enabled) 3795 if (intr_remapping_enabled)
3781 set_ir_ioapic_affinity_irq(irq, TARGET_CPUS); 3796 set_ir_ioapic_affinity_irq(irq, mask);
3782#endif
3783 else 3797 else
3784 set_ioapic_affinity_irq(irq, TARGET_CPUS); 3798#endif
3799 set_ioapic_affinity_irq(irq, mask);
3785 } 3800 }
3786 3801
3787 } 3802 }