public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/2] x86, irq: update the vector domain for legacy irqs handled by io-apic
@ 2010-01-29 19:42 Suresh Siddha
  2010-01-29 19:42 ` [patch 2/2] x86, irq: move __setup_vector_irq() before the first irq enable in cpu online path Suresh Siddha
  2010-01-29 23:12 ` [tip:x86/apic] x86, irq: Update the vector domain for legacy irqs handled by io-apic tip-bot for Suresh Siddha
  0 siblings, 2 replies; 4+ messages in thread
From: Suresh Siddha @ 2010-01-29 19:42 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar, Thomas Gleixner
  Cc: LKML, Suresh Siddha, Yinghai Lu, Eric W. Biederman, lizf

[-- Attachment #1: update_legacyirq_cfg_domains_handled_by_ioapic.patch --]
[-- Type: text/plain, Size: 1630 bytes --]

In the recent change of not reserving IRQ0_VECTOR..IRQ15_VECTOR's on all
cpu's, we start with irq 0..15 getting directed to (and handled on) cpu-0.

In the logical flat mode, once the AP's are online (and before irqbalance
comes into picture), kernel intends to handle these IRQ's on any cpu (as the
logical flat mode allows to specify multiple cpu's for the irq destination and
the chipset based routing can deliver to the interrupt to any one of
the specified cpu's). This was broken with our recent change, which was ending
up using only cpu 0 as the destination, even when the kernel was specifying to
use all online cpu's for the logical flat mode case.

Fix this by updating vector allocation domain (cfg->domain) for legacy irqs,
when the IO-APIC handles them.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
---

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 0cc7022..a18bab0 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1428,6 +1428,14 @@ static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq
 
 	cfg = desc->chip_data;
 
+	/*
+ 	 * For legacy irqs, cfg->domain starts with cpu 0 for legacy
+ 	 * controllers like 8259. Now that IO-APIC can handle this irq, update
+ 	 * the cfg->domain.
+ 	 */
+	if (irq < nr_legacy_irqs && cpumask_test_cpu(0, cfg->domain))
+		apic->vector_allocation_domain(0, cfg->domain);
+
 	if (assign_irq_vector(irq, cfg, apic->target_cpus()))
 		return;
 



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-29 23:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29 19:42 [patch 1/2] x86, irq: update the vector domain for legacy irqs handled by io-apic Suresh Siddha
2010-01-29 19:42 ` [patch 2/2] x86, irq: move __setup_vector_irq() before the first irq enable in cpu online path Suresh Siddha
2010-01-29 23:12   ` [tip:x86/apic] x86, irq: Move " tip-bot for Suresh Siddha
2010-01-29 23:12 ` [tip:x86/apic] x86, irq: Update the vector domain for legacy irqs handled by io-apic tip-bot for Suresh Siddha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox