Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100096
b: refs/heads/master
c: 0b9f4f4
h: refs/heads/master
v: v3
  • Loading branch information
Maciej W. Rozycki authored and Ingo Molnar committed Jul 10, 2008
1 parent 982d6d6 commit 197028d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9076b63191ec799ba6848ce5603fff109da57d2
refs/heads/master: 0b9f4f49e2abe787673de8f1f56f053fb30fec24
22 changes: 21 additions & 1 deletion trunk/arch/x86/kernel/io_apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,26 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
entry->pin = pin;
}

/*
* Reroute an IRQ to a different pin.
*/
static void __init replace_pin_at_irq(unsigned int irq,
int oldapic, int oldpin,
int newapic, int newpin)
{
struct irq_pin_list *entry = irq_2_pin + irq;

while (1) {
if (entry->apic == oldapic && entry->pin == oldpin) {
entry->apic = newapic;
entry->pin = newpin;
}
if (!entry->next)
break;
entry = irq_2_pin + entry->next;
}
}


#define DO_ACTION(name,R,ACTION, FINAL) \
\
Expand Down Expand Up @@ -1735,7 +1755,7 @@ static inline void __init check_timer(void)
/*
* legacy devices should be connected to IO APIC #0
*/
/* replace_pin_at_irq(0, apic1, pin1, apic2, pin2); */
replace_pin_at_irq(0, apic1, pin1, apic2, pin2);
setup_timer_IRQ0_pin(apic2, pin2, cfg->vector);
unmask_IO_APIC_irq(0);
enable_8259A_irq(0);
Expand Down

0 comments on commit 197028d

Please sign in to comment.