diff options
Diffstat (limited to 'arch/x86/kernel/irqinit.c')
| -rw-r--r-- | arch/x86/kernel/irqinit.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index ef257fc2921b..0ed2d300cd46 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #include <linux/ioport.h> | 5 | #include <linux/ioport.h> |
| 6 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
| 7 | #include <linux/timex.h> | 7 | #include <linux/timex.h> |
| 8 | #include <linux/slab.h> | ||
| 9 | #include <linux/random.h> | 8 | #include <linux/random.h> |
| 10 | #include <linux/kprobes.h> | 9 | #include <linux/kprobes.h> |
| 11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
| @@ -141,6 +140,28 @@ void __init init_IRQ(void) | |||
| 141 | x86_init.irqs.intr_init(); | 140 | x86_init.irqs.intr_init(); |
| 142 | } | 141 | } |
| 143 | 142 | ||
| 143 | /* | ||
| 144 | * Setup the vector to irq mappings. | ||
| 145 | */ | ||
| 146 | void setup_vector_irq(int cpu) | ||
| 147 | { | ||
| 148 | #ifndef CONFIG_X86_IO_APIC | ||
| 149 | int irq; | ||
| 150 | |||
| 151 | /* | ||
| 152 | * On most of the platforms, legacy PIC delivers the interrupts on the | ||
| 153 | * boot cpu. But there are certain platforms where PIC interrupts are | ||
| 154 | * delivered to multiple cpu's. If the legacy IRQ is handled by the | ||
| 155 | * legacy PIC, for the new cpu that is coming online, setup the static | ||
| 156 | * legacy vector to irq mapping: | ||
| 157 | */ | ||
| 158 | for (irq = 0; irq < legacy_pic->nr_legacy_irqs; irq++) | ||
| 159 | per_cpu(vector_irq, cpu)[IRQ0_VECTOR + irq] = irq; | ||
| 160 | #endif | ||
| 161 | |||
| 162 | __setup_vector_irq(cpu); | ||
| 163 | } | ||
| 164 | |||
| 144 | static void __init smp_intr_init(void) | 165 | static void __init smp_intr_init(void) |
| 145 | { | 166 | { |
| 146 | #ifdef CONFIG_SMP | 167 | #ifdef CONFIG_SMP |
