MSI: arch must connect the irq and the msi_desc
authorMichael Ellerman <michael@ellerman.id.au>
Wed, 18 Apr 2007 09:39:21 +0000 (19:39 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 May 2007 02:02:38 +0000 (19:02 -0700)
commit7fe3730de729b758e9f69b862b9255d998671b5f
tree2fc0cf3a003aaf6e8c257a32b748941e3eec93b2
parentf282b97021ddc95c6092b9016f667c0963858fb1
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>
arch/i386/kernel/io_apic.c
arch/ia64/sn/kernel/msi_sn.c
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/pci_sun4v.c
arch/x86_64/kernel/io_apic.c
drivers/pci/msi.c
kernel/irq/chip.c