aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/irq.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-05-06 13:08:22 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-11 04:35:09 -0400
commite20c06fd6950265a899edd96a02dc2e6ae2d1ce5 (patch)
tree851deab98ff271debe6efb76443fb5fdc3d0be0c /arch/x86/pci/irq.c
parentbdfe8ac153546537ed24de69610ea781a734f785 (diff)
x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector()
To prepare those params for pcibios_irq_enable() to call setup_io_apic_routing(). [ Impact: extend function call API to prepare for new functionality ] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Len Brown <lenb@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> LKML-Reference: <4A01C406.2040303@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/pci/irq.c')
-rw-r--r--arch/x86/pci/irq.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index fecbce6e7d7c..a2f6bde9c4eb 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -1051,12 +1051,16 @@ static void __init pcibios_fixup_irqs(void)
1051 */ 1051 */
1052 if (io_apic_assign_pci_irqs) { 1052 if (io_apic_assign_pci_irqs) {
1053 int irq; 1053 int irq;
1054 int ioapic = -1, ioapic_pin = -1;
1055 int triggering, polarity;
1054 1056
1055 /* 1057 /*
1056 * interrupt pins are numbered starting from 1 1058 * interrupt pins are numbered starting from 1
1057 */ 1059 */
1058 irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, 1060 irq = IO_APIC_get_PCI_irq_vector(dev->bus->number,
1059 PCI_SLOT(dev->devfn), pin - 1); 1061 PCI_SLOT(dev->devfn), pin - 1,
1062 &ioapic, &ioapic_pin,
1063 &triggering, &polarity);
1060 /* 1064 /*
1061 * Busses behind bridges are typically not listed in the 1065 * Busses behind bridges are typically not listed in the
1062 * MP-table. In this case we have to look up the IRQ 1066 * MP-table. In this case we have to look up the IRQ
@@ -1072,7 +1076,10 @@ static void __init pcibios_fixup_irqs(void)
1072 pin = pci_swizzle_interrupt_pin(dev, pin); 1076 pin = pci_swizzle_interrupt_pin(dev, pin);
1073 bus = bridge->bus->number; 1077 bus = bridge->bus->number;
1074 irq = IO_APIC_get_PCI_irq_vector(bus, 1078 irq = IO_APIC_get_PCI_irq_vector(bus,
1075 PCI_SLOT(bridge->devfn), pin - 1); 1079 PCI_SLOT(bridge->devfn),
1080 pin - 1,
1081 &ioapic, &ioapic_pin,
1082 &triggering, &polarity);
1076 if (irq >= 0) 1083 if (irq >= 0)
1077 dev_warn(&dev->dev, 1084 dev_warn(&dev->dev,
1078 "using bridge %s INT %c to " 1085 "using bridge %s INT %c to "
@@ -1221,8 +1228,14 @@ static int pirq_enable_irq(struct pci_dev *dev)
1221 1228
1222 if (io_apic_assign_pci_irqs) { 1229 if (io_apic_assign_pci_irqs) {
1223 int irq; 1230 int irq;
1231 int ioapic = -1, ioapic_pin = -1;
1232 int triggering, polarity;
1224 1233
1225 irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin - 1); 1234 irq = IO_APIC_get_PCI_irq_vector(dev->bus->number,
1235 PCI_SLOT(dev->devfn),
1236 pin - 1,
1237 &ioapic, &ioapic_pin,
1238 &triggering, &polarity);
1226 /* 1239 /*
1227 * Busses behind bridges are typically not listed in the MP-table. 1240 * Busses behind bridges are typically not listed in the MP-table.
1228 * In this case we have to look up the IRQ based on the parent bus, 1241 * In this case we have to look up the IRQ based on the parent bus,
@@ -1235,7 +1248,10 @@ static int pirq_enable_irq(struct pci_dev *dev)
1235 1248
1236 pin = pci_swizzle_interrupt_pin(dev, pin); 1249 pin = pci_swizzle_interrupt_pin(dev, pin);
1237 irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, 1250 irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
1238 PCI_SLOT(bridge->devfn), pin - 1); 1251 PCI_SLOT(bridge->devfn),
1252 pin - 1,
1253 &ioapic, &ioapic_pin,
1254 &triggering, &polarity);
1239 if (irq >= 0) 1255 if (irq >= 0)
1240 dev_warn(&dev->dev, "using bridge %s " 1256 dev_warn(&dev->dev, "using bridge %s "
1241 "INT %c to get IRQ %d\n", 1257 "INT %c to get IRQ %d\n",