aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/io_apic.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-04-18 05:39:21 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 22:02:38 -0400
commit7fe3730de729b758e9f69b862b9255d998671b5f (patch)
tree2fc0cf3a003aaf6e8c257a32b748941e3eec93b2 /arch/i386/kernel/io_apic.c
parentf282b97021ddc95c6092b9016f667c0963858fb1 (diff)
MSI: arch must connect the irq and the msi_desc
set_irq_msi() currently connects an irq_desc to an msi_desc. The archs call it at some point in their setup routine, and then the generic code sets up the reverse mapping from the msi_desc back to the irq. set_irq_msi() should do both connections, making it the one and only call required to connect an irq with it's MSI desc and vice versa. The arch code MUST call set_irq_msi(), and it must do so only once it's sure it's not going to fail the irq allocation. Given that there's no need for the arch to return the irq anymore, the return value from the arch setup routine just becomes 0 for success and anything else for failure. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/i386/kernel/io_apic.c')
-rw-r--r--arch/i386/kernel/io_apic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index b3ab8ffebd27..89d85d244926 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -2611,19 +2611,19 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
2611 if (irq < 0) 2611 if (irq < 0)
2612 return irq; 2612 return irq;
2613 2613
2614 set_irq_msi(irq, desc);
2615 ret = msi_compose_msg(dev, irq, &msg); 2614 ret = msi_compose_msg(dev, irq, &msg);
2616 if (ret < 0) { 2615 if (ret < 0) {
2617 destroy_irq(irq); 2616 destroy_irq(irq);
2618 return ret; 2617 return ret;
2619 } 2618 }
2620 2619
2620 set_irq_msi(irq, desc);
2621 write_msi_msg(irq, &msg); 2621 write_msi_msg(irq, &msg);
2622 2622
2623 set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq, 2623 set_irq_chip_and_handler_name(irq, &msi_chip, handle_edge_irq,
2624 "edge"); 2624 "edge");
2625 2625
2626 return irq; 2626 return 0;
2627} 2627}
2628 2628
2629void arch_teardown_msi_irq(unsigned int irq) 2629void arch_teardown_msi_irq(unsigned int irq)