diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/io_apic_64.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index f930885ac667..848411753c7c 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -373,6 +373,26 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin) | |||
373 | entry->pin = pin; | 373 | entry->pin = pin; |
374 | } | 374 | } |
375 | 375 | ||
376 | /* | ||
377 | * Reroute an IRQ to a different pin. | ||
378 | */ | ||
379 | static void __init replace_pin_at_irq(unsigned int irq, | ||
380 | int oldapic, int oldpin, | ||
381 | int newapic, int newpin) | ||
382 | { | ||
383 | struct irq_pin_list *entry = irq_2_pin + irq; | ||
384 | |||
385 | while (1) { | ||
386 | if (entry->apic == oldapic && entry->pin == oldpin) { | ||
387 | entry->apic = newapic; | ||
388 | entry->pin = newpin; | ||
389 | } | ||
390 | if (!entry->next) | ||
391 | break; | ||
392 | entry = irq_2_pin + entry->next; | ||
393 | } | ||
394 | } | ||
395 | |||
376 | 396 | ||
377 | #define DO_ACTION(name,R,ACTION, FINAL) \ | 397 | #define DO_ACTION(name,R,ACTION, FINAL) \ |
378 | \ | 398 | \ |
@@ -1735,7 +1755,7 @@ static inline void __init check_timer(void) | |||
1735 | /* | 1755 | /* |
1736 | * legacy devices should be connected to IO APIC #0 | 1756 | * legacy devices should be connected to IO APIC #0 |
1737 | */ | 1757 | */ |
1738 | /* replace_pin_at_irq(0, apic1, pin1, apic2, pin2); */ | 1758 | replace_pin_at_irq(0, apic1, pin1, apic2, pin2); |
1739 | setup_timer_IRQ0_pin(apic2, pin2, cfg->vector); | 1759 | setup_timer_IRQ0_pin(apic2, pin2, cfg->vector); |
1740 | unmask_IO_APIC_irq(0); | 1760 | unmask_IO_APIC_irq(0); |
1741 | enable_8259A_irq(0); | 1761 | enable_8259A_irq(0); |