aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/hw_irq.h2
-rw-r--r--arch/x86/kernel/apic/io_apic.c13
-rw-r--r--arch/x86/pci/irq.c6
-rw-r--r--drivers/pci/hotplug/ibmphp_core.c5
4 files changed, 7 insertions, 19 deletions
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index 8dbe237bd806..b12c45c5d8ec 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -162,7 +162,7 @@ static inline void send_cleanup_vector(struct irq_cfg *c) { }
162struct irq_data; 162struct irq_data;
163int __ioapic_set_affinity(struct irq_data *, const struct cpumask *, 163int __ioapic_set_affinity(struct irq_data *, const struct cpumask *,
164 unsigned int *dest_id); 164 unsigned int *dest_id);
165extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin, struct io_apic_irq_attr *irq_attr); 165extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin);
166extern void setup_ioapic_dest(void); 166extern void setup_ioapic_dest(void);
167 167
168extern void enable_IO_APIC(void); 168extern void enable_IO_APIC(void);
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 1cedf410096e..447186a0eeee 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1179,8 +1179,7 @@ void mp_unmap_irq(int irq)
1179 * Find a specific PCI IRQ entry. 1179 * Find a specific PCI IRQ entry.
1180 * Not an __init, possibly needed by modules 1180 * Not an __init, possibly needed by modules
1181 */ 1181 */
1182int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin, 1182int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
1183 struct io_apic_irq_attr *irq_attr)
1184{ 1183{
1185 int irq, i, best_ioapic = -1, best_idx = -1; 1184 int irq, i, best_ioapic = -1, best_idx = -1;
1186 1185
@@ -1234,14 +1233,8 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin,
1234 return -1; 1233 return -1;
1235 1234
1236out: 1235out:
1237 irq = pin_2_irq(best_idx, best_ioapic, mp_irqs[best_idx].dstirq, 1236 return pin_2_irq(best_idx, best_ioapic, mp_irqs[best_idx].dstirq,
1238 IOAPIC_MAP_ALLOC); 1237 IOAPIC_MAP_ALLOC);
1239 if (irq > 0)
1240 set_io_apic_irq_attr(irq_attr, best_ioapic,
1241 mp_irqs[best_idx].dstirq,
1242 irq_trigger(best_idx),
1243 irq_polarity(best_idx));
1244 return irq;
1245} 1238}
1246EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector); 1239EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
1247 1240
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index 99884588a47a..77148eccdf23 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -1200,14 +1200,12 @@ static int pirq_enable_irq(struct pci_dev *dev)
1200#ifdef CONFIG_X86_IO_APIC 1200#ifdef CONFIG_X86_IO_APIC
1201 struct pci_dev *temp_dev; 1201 struct pci_dev *temp_dev;
1202 int irq; 1202 int irq;
1203 struct io_apic_irq_attr irq_attr;
1204 1203
1205 if (dev->irq_managed && dev->irq > 0) 1204 if (dev->irq_managed && dev->irq > 0)
1206 return 0; 1205 return 0;
1207 1206
1208 irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, 1207 irq = IO_APIC_get_PCI_irq_vector(dev->bus->number,
1209 PCI_SLOT(dev->devfn), 1208 PCI_SLOT(dev->devfn), pin - 1);
1210 pin - 1, &irq_attr);
1211 /* 1209 /*
1212 * Busses behind bridges are typically not listed in the MP-table. 1210 * Busses behind bridges are typically not listed in the MP-table.
1213 * In this case we have to look up the IRQ based on the parent bus, 1211 * In this case we have to look up the IRQ based on the parent bus,
@@ -1221,7 +1219,7 @@ static int pirq_enable_irq(struct pci_dev *dev)
1221 pin = pci_swizzle_interrupt_pin(dev, pin); 1219 pin = pci_swizzle_interrupt_pin(dev, pin);
1222 irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, 1220 irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
1223 PCI_SLOT(bridge->devfn), 1221 PCI_SLOT(bridge->devfn),
1224 pin - 1, &irq_attr); 1222 pin - 1);
1225 if (irq >= 0) 1223 if (irq >= 0)
1226 dev_warn(&dev->dev, "using bridge %s " 1224 dev_warn(&dev->dev, "using bridge %s "
1227 "INT %c to get IRQ %d\n", 1225 "INT %c to get IRQ %d\n",
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index 3efaf4c38528..d261e623541f 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -155,13 +155,10 @@ int ibmphp_init_devno(struct slot **cur_slot)
155 for (loop = 0; loop < len; loop++) { 155 for (loop = 0; loop < len; loop++) {
156 if ((*cur_slot)->number == rtable->slots[loop].slot && 156 if ((*cur_slot)->number == rtable->slots[loop].slot &&
157 (*cur_slot)->bus == rtable->slots[loop].bus) { 157 (*cur_slot)->bus == rtable->slots[loop].bus) {
158 struct io_apic_irq_attr irq_attr;
159
160 (*cur_slot)->device = PCI_SLOT(rtable->slots[loop].devfn); 158 (*cur_slot)->device = PCI_SLOT(rtable->slots[loop].devfn);
161 for (i = 0; i < 4; i++) 159 for (i = 0; i < 4; i++)
162 (*cur_slot)->irq[i] = IO_APIC_get_PCI_irq_vector((int) (*cur_slot)->bus, 160 (*cur_slot)->irq[i] = IO_APIC_get_PCI_irq_vector((int) (*cur_slot)->bus,
163 (int) (*cur_slot)->device, i, 161 (int) (*cur_slot)->device, i);
164 &irq_attr);
165 162
166 debug("(*cur_slot)->irq[0] = %x\n", 163 debug("(*cur_slot)->irq[0] = %x\n",
167 (*cur_slot)->irq[0]); 164 (*cur_slot)->irq[0]);