remarkable-linux/include
Alexander Gordeev 65f6ae66a6 PCI: Allocate only as many MSI vectors as requested by driver
Because of the encoding of the "Multiple Message Capable" and "Multiple
Message Enable" fields, a device can only advertise that it's capable of a
power-of-two number of vectors, and the OS can only enable a power-of-two
number.

For example, a device that's limited internally to using 18 vectors would
have to advertise that it's capable of 32.  The 14 extra vectors consume
vector numbers and IRQ descriptors even though the device can't actually
use them.

This fix introduces a 'msi_desc::nvec_used' field to address this issue.
When non-zero, it is the actual number of MSIs the device will send, as
requested by the device driver.  This value should be used by architectures
to set up and tear down only as many interrupt resources as the device will
actually use.

Note, although the existing 'msi_desc::multiple' field might seem
redundant, in fact it is not.  The number of MSIs advertised need not be
the smallest power-of-two larger than the number of MSIs the device will
send.  Thus, it is not always possible to derive the former from the
latter, so we need to keep them both to handle this case.

[bhelgaas: changelog, rename to "nvec_used"]
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2013-05-28 11:31:16 -06:00
..
acpi Merge branch 'acpi-assorted' 2013-04-28 01:54:08 +02:00
asm-generic Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-05-05 13:23:27 -07:00
clocksource ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
crypto crypto: sha512 - Expose generic sha512 routine to be callable from other modules 2013-04-25 21:00:57 +08:00
drm Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2013-05-02 19:40:34 -07:00
dt-bindings ARM: dt: create a DT header for the GIC 2013-04-05 12:23:24 -06:00
keys
linux PCI: Allocate only as many MSI vectors as requested by driver 2013-05-28 11:31:16 -06:00
math-emu
media Merge branch 'topic/omap3isp' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2013-05-01 09:57:04 -07:00
memory
misc
net net: frag, fix race conditions in LRU list maintenance 2013-05-06 11:06:51 -04:00
pcmcia
ras
rdma
rxrpc
scsi Merge branch 'postmerge' into for-linus 2013-05-10 07:54:01 -07:00
sound sound fixes for v3.10-rc1 2013-05-10 07:51:56 -07:00
target iscsi-target: Add iscsit_transport API template 2013-04-25 01:05:26 -07:00
trace f2fs updates for v3.10 2013-05-08 15:11:48 -07:00
uapi Merge git://git.infradead.org/users/eparis/audit 2013-05-11 14:29:11 -07:00
video Merge branch 'late/clksrc' into late/cleanup 2013-05-06 23:43:45 +02:00
xen Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
Kbuild UAPI: remove empty Kbuild files 2013-04-30 17:04:09 -07:00