aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/io_apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r--arch/x86/kernel/apic/io_apic.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8eb863e27ea..a7052fafdd4 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1324,8 +1324,8 @@ static int setup_ioapic_entry(int apic_id, int irq,
1324 return 0; 1324 return 0;
1325} 1325}
1326 1326
1327static void setup_ioapic_irq(int apic_id, int pin, unsigned int irq, 1327static void setup_ioapic_irq(unsigned int irq, struct irq_cfg *cfg,
1328 struct irq_cfg *cfg, int trigger, int polarity) 1328 struct io_apic_irq_attr *attr)
1329{ 1329{
1330 struct IO_APIC_route_entry entry; 1330 struct IO_APIC_route_entry entry;
1331 unsigned int dest; 1331 unsigned int dest;
@@ -1348,23 +1348,24 @@ static void setup_ioapic_irq(int apic_id, int pin, unsigned int irq,
1348 apic_printk(APIC_VERBOSE,KERN_DEBUG 1348 apic_printk(APIC_VERBOSE,KERN_DEBUG
1349 "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> " 1349 "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> "
1350 "IRQ %d Mode:%i Active:%i Dest:%d)\n", 1350 "IRQ %d Mode:%i Active:%i Dest:%d)\n",
1351 apic_id, mpc_ioapic_id(apic_id), pin, cfg->vector, 1351 attr->ioapic, mpc_ioapic_id(attr->ioapic), attr->ioapic_pin,
1352 irq, trigger, polarity, dest); 1352 cfg->vector, irq, attr->trigger, attr->polarity, dest);
1353 1353
1354 1354
1355 if (setup_ioapic_entry(mpc_ioapic_id(apic_id), irq, &entry, 1355 if (setup_ioapic_entry(mpc_ioapic_id(attr->ioapic), irq, &entry,
1356 dest, trigger, polarity, cfg->vector, pin)) { 1356 dest, attr->trigger, attr->polarity, cfg->vector,
1357 attr->ioapic_pin)) {
1357 printk("Failed to setup ioapic entry for ioapic %d, pin %d\n", 1358 printk("Failed to setup ioapic entry for ioapic %d, pin %d\n",
1358 mpc_ioapic_id(apic_id), pin); 1359 mpc_ioapic_id(attr->ioapic), attr->ioapic_pin);
1359 __clear_irq_vector(irq, cfg); 1360 __clear_irq_vector(irq, cfg);
1360 return; 1361 return;
1361 } 1362 }
1362 1363
1363 ioapic_register_intr(irq, cfg, trigger); 1364 ioapic_register_intr(irq, cfg, attr->trigger);
1364 if (irq < legacy_pic->nr_legacy_irqs) 1365 if (irq < legacy_pic->nr_legacy_irqs)
1365 legacy_pic->mask(irq); 1366 legacy_pic->mask(irq);
1366 1367
1367 ioapic_write_entry(apic_id, pin, entry); 1368 ioapic_write_entry(attr->ioapic, attr->ioapic_pin, entry);
1368} 1369}
1369 1370
1370static bool __init io_apic_pin_not_connected(int idx, int apic_id, int pin) 1371static bool __init io_apic_pin_not_connected(int idx, int apic_id, int pin)
@@ -3566,8 +3567,7 @@ io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr)
3566 return -EINVAL; 3567 return -EINVAL;
3567 ret = __add_pin_to_irq_node(cfg, node, attr->ioapic, attr->ioapic_pin); 3568 ret = __add_pin_to_irq_node(cfg, node, attr->ioapic, attr->ioapic_pin);
3568 if (!ret) 3569 if (!ret)
3569 setup_ioapic_irq(attr->ioapic, attr->ioapic_pin, irq, cfg, 3570 setup_ioapic_irq(irq, cfg, attr);
3570 attr->trigger, attr->polarity);
3571 return ret; 3571 return ret;
3572} 3572}
3573 3573