diff options
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index dae9240bd287..0d35f46929d1 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1019,7 +1019,7 @@ static inline int irq_trigger(int idx) | |||
1019 | int (*ioapic_renumber_irq)(int ioapic, int irq); | 1019 | int (*ioapic_renumber_irq)(int ioapic, int irq); |
1020 | static int pin_2_irq(int idx, int apic, int pin) | 1020 | static int pin_2_irq(int idx, int apic, int pin) |
1021 | { | 1021 | { |
1022 | int irq, i; | 1022 | int irq; |
1023 | int bus = mp_irqs[idx].srcbus; | 1023 | int bus = mp_irqs[idx].srcbus; |
1024 | 1024 | ||
1025 | /* | 1025 | /* |
@@ -1031,18 +1031,13 @@ static int pin_2_irq(int idx, int apic, int pin) | |||
1031 | if (test_bit(bus, mp_bus_not_pci)) { | 1031 | if (test_bit(bus, mp_bus_not_pci)) { |
1032 | irq = mp_irqs[idx].srcbusirq; | 1032 | irq = mp_irqs[idx].srcbusirq; |
1033 | } else { | 1033 | } else { |
1034 | /* | 1034 | u32 gsi = mp_gsi_routing[apic].gsi_base + pin; |
1035 | * PCI IRQs are mapped in order | ||
1036 | */ | ||
1037 | i = irq = 0; | ||
1038 | while (i < apic) | ||
1039 | irq += nr_ioapic_registers[i++]; | ||
1040 | irq += pin; | ||
1041 | /* | 1035 | /* |
1042 | * For MPS mode, so far only needed by ES7000 platform | 1036 | * For MPS mode, so far only needed by ES7000 platform |
1043 | */ | 1037 | */ |
1044 | if (ioapic_renumber_irq) | 1038 | if (ioapic_renumber_irq) |
1045 | irq = ioapic_renumber_irq(apic, irq); | 1039 | gsi = ioapic_renumber_irq(apic, gsi); |
1040 | irq = gsi; | ||
1046 | } | 1041 | } |
1047 | 1042 | ||
1048 | #ifdef CONFIG_X86_32 | 1043 | #ifdef CONFIG_X86_32 |