Michael Ellerman 9c8313343c MSI: Give archs the option to allocate all MSI/Xs at once.
This patch introduces an optional function, arch_setup_msi_irqs(),
(note the plural) which gives an arch the opportunity to do per-device
setup for MSI/X and then allocate all the requested MSI/Xs at once.

If that's not required by the arch, the default version simply calls
arch_setup_msi_irq() for each MSI irq required.

arch_setup_msi_irqs() is passed a pdev, attached to the pdev is a list
of msi_descs with irq == 0, it is up to the arch to connect these up to
an irq (via set_irq_msi()) or return an error. For convenience the number
of vectors and the type are passed also.

All msi_descs with irq != 0 are considered allocated, and the arch
teardown routine will be called on them when necessary.

The existing semantics of pci_enable_msix() are that if the requested
number of irqs can not be allocated, the maximum number that _could_ be
allocated is returned. To support that, we define that in case of an
error from arch_setup_msi_irqs(), the number of msi_descs with irq != 0
are considered allocated, and are counted toward the "max that could be
allocated".


Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-02 19:02:38 -07:00
..
2007-02-20 17:10:15 -08:00
2007-02-20 17:10:14 -08:00
2007-04-27 10:57:31 -07:00
2007-04-27 10:57:34 -07:00
2007-02-09 17:39:36 -05:00
2007-02-11 11:18:07 -08:00
2007-03-27 09:05:15 -07:00
2007-04-28 11:01:07 -04:00
2007-04-19 14:56:12 +02:00
2007-04-07 10:03:43 -07:00
2007-02-13 22:09:01 +01:00
2007-04-25 22:30:01 -07:00
2007-04-25 22:29:10 -07:00
2007-04-25 22:24:41 -07:00
2007-04-25 22:29:10 -07:00
2007-03-01 14:53:38 -08:00
2007-04-25 22:25:52 -07:00
2007-04-30 16:40:39 -07:00
2007-04-30 16:40:40 -07:00
2007-02-16 14:37:06 +00:00
2007-04-25 22:29:49 -07:00
2007-03-04 11:12:42 +02:00
2007-02-17 19:17:37 +01:00
2007-03-01 14:53:35 -08:00
2007-03-16 19:25:05 -07:00
2007-03-12 16:31:50 -07:00
2007-05-02 19:02:37 -07:00
2007-03-27 08:55:47 +02:00
2007-04-17 16:36:26 -07:00
2007-04-30 16:40:41 -07:00
2007-02-11 10:51:28 -08:00
2007-02-11 10:51:28 -08:00
2007-04-27 10:46:51 -07:00
2007-02-20 17:10:14 -08:00
2007-02-20 17:10:14 -08:00
2007-02-12 09:48:41 -08:00
2007-02-11 10:51:18 -08:00
2007-02-20 17:10:13 -08:00
2007-02-16 08:13:57 -08:00
2007-02-16 08:13:56 -08:00
2007-03-05 07:57:51 -08:00
2007-02-11 10:51:25 -08:00
2007-02-11 11:18:05 -08:00
2007-04-28 21:20:32 -07:00