aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/irqinit.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2010-03-15 18:33:06 -0400
committerIngo Molnar <mingo@elte.hu>2010-03-16 01:36:35 -0400
commit36e9e1eab777e077f7484d309ff676d0568e27d1 (patch)
tree488fd5fb3ee1b3e755ddd08e57e3fc55e22babee /arch/x86/kernel/irqinit.c
parenta3d3203e4bb40f253b1541e310dc0f9305be7c84 (diff)
x86: Handle legacy PIC interrupts on all the cpu's
Ingo Molnar reported that with the recent changes of not statically blocking IRQ0_VECTOR..IRQ15_VECTOR's on all the cpu's, broke an AMD platform (with Nvidia chipset) boot when "noapic" boot option is used. On this platform, legacy PIC interrupts are getting delivered to all the cpu's instead of just the boot cpu. Thus not initializing the vector to irq mapping for the legacy irq's resulted in not handling certain interrupts causing boot hang. Fix this by initializing the vector to irq mapping on all the logical cpu's, if the legacy IRQ is handled by the legacy PIC. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> [ -v2: io-apic-enabled improvement ] Acked-by: Yinghai Lu <yinghai@kernel.org> Cc: Eric W. Biederman <ebiederm@xmission.com> LKML-Reference: <1268692386.3296.43.camel@sbs-t61.sc.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/irqinit.c')
-rw-r--r--arch/x86/kernel/irqinit.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index ef257fc2921b..f01d390f9c5b 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -141,6 +141,28 @@ void __init init_IRQ(void)
141 x86_init.irqs.intr_init(); 141 x86_init.irqs.intr_init();
142} 142}
143 143
144/*
145 * Setup the vector to irq mappings.
146 */
147void setup_vector_irq(int cpu)
148{
149#ifndef CONFIG_X86_IO_APIC
150 int irq;
151
152 /*
153 * On most of the platforms, legacy PIC delivers the interrupts on the
154 * boot cpu. But there are certain platforms where PIC interrupts are
155 * delivered to multiple cpu's. If the legacy IRQ is handled by the
156 * legacy PIC, for the new cpu that is coming online, setup the static
157 * legacy vector to irq mapping:
158 */
159 for (irq = 0; irq < legacy_pic->nr_legacy_irqs; irq++)
160 per_cpu(vector_irq, cpu)[IRQ0_VECTOR + irq] = irq;
161#endif
162
163 __setup_vector_irq(cpu);
164}
165
144static void __init smp_intr_init(void) 166static void __init smp_intr_init(void)
145{ 167{
146#ifdef CONFIG_SMP 168#ifdef CONFIG_SMP