diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-11-07 06:33:49 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-09 16:25:08 -0500 |
commit | 6c2e94033df5ca11149e52dd179b8dde3172e9bf (patch) | |
tree | 5f22154e19191d69ff2a24d62e64af9875228daf | |
parent | 612e3684c1b7752d2890510e4f90115fd1eb2afb (diff) |
x86: apic honour irq affinity which was set in early boot
setup_ioapic_dest() is called after the non boot cpus have been
brought up. It sets the irq affinity of all already configured
interrupts to all cpus and ignores affinity settings which were
done by the early bootup code.
If the IRQ_NO_BALANCING or IRQ_AFFINITY_SET flags are set then use the
affinity mask from the irq descriptor and not TARGET_CPUS.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-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 | } |