diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/irqinit.c | 22 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 2 |
3 files changed, 31 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index e4e0ddcb1546..463de9a858ad 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1268,6 +1268,14 @@ void __setup_vector_irq(int cpu) | |||
1268 | /* Mark the inuse vectors */ | 1268 | /* Mark the inuse vectors */ |
1269 | for_each_irq_desc(irq, desc) { | 1269 | for_each_irq_desc(irq, desc) { |
1270 | cfg = desc->chip_data; | 1270 | cfg = desc->chip_data; |
1271 | |||
1272 | /* | ||
1273 | * If it is a legacy IRQ handled by the legacy PIC, this cpu | ||
1274 | * will be part of the irq_cfg's domain. | ||
1275 | */ | ||
1276 | if (irq < legacy_pic->nr_legacy_irqs && !IO_APIC_IRQ(irq)) | ||
1277 | cpumask_set_cpu(cpu, cfg->domain); | ||
1278 | |||
1271 | if (!cpumask_test_cpu(cpu, cfg->domain)) | 1279 | if (!cpumask_test_cpu(cpu, cfg->domain)) |
1272 | continue; | 1280 | continue; |
1273 | vector = cfg->vector; | 1281 | vector = cfg->vector; |
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 | */ | ||
147 | void 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 | |||
144 | static void __init smp_intr_init(void) | 166 | static void __init smp_intr_init(void) |
145 | { | 167 | { |
146 | #ifdef CONFIG_SMP | 168 | #ifdef CONFIG_SMP |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index a02e80c3c54b..06d98ae5a802 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -247,7 +247,7 @@ static void __cpuinit smp_callin(void) | |||
247 | /* | 247 | /* |
248 | * Need to setup vector mappings before we enable interrupts. | 248 | * Need to setup vector mappings before we enable interrupts. |
249 | */ | 249 | */ |
250 | __setup_vector_irq(smp_processor_id()); | 250 | setup_vector_irq(smp_processor_id()); |
251 | /* | 251 | /* |
252 | * Get our bogomips. | 252 | * Get our bogomips. |
253 | * | 253 | * |