kernel_optimize_test/drivers
Michael Ellerman b5fbf53324 PCI/MSI: Allow arch code to return the number of MSI-X available
There is code in msix_capability_init() which, when the requested number
of MSI-X couldn't be allocated, calculates how many MSI-X /could/ be
allocated and returns that to the driver. That allows the driver to then
make a second request, with a number of MSIs that should succeed.

The current code requires the arch code to setup as many msi_descs as it
can, and then return to the generic code. On some platforms the arch
code may already know how many MSI-X it can allocate, before it sets up
any of the msi_descs.

So change the logic such that if the arch code returns a positive error
code, that is taken to be the number of MSI-X that could be allocated.
If the error code is negative we still calculate the number available
using the old method.

Because it's a little subtle, make sure the error return code from
arch_setup_msi_irq() is always negative. That way only implementations
of arch_setup_msi_irqs() need to be careful about returning a positive
error code.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-03-19 19:29:34 -07:00
..
accessibility
acpi PCI/ACPI: rename pci_osc_control_set() 2009-03-19 19:29:33 -07:00
amba
ata
atm
auxdisplay
base
block Merge commit 'gcl/merge' into merge 2009-03-18 13:16:30 +11:00
bluetooth
cdrom
char
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma
edac
eisa
firewire
firmware
gpio
gpu
hid
hwmon
i2c
ide
idle
ieee1394
infiniband
input
isdn
leds
lguest
macintosh
mca
md dm crypt: wait for endio to complete before destruction 2009-03-16 17:44:36 +00:00
media
memstick
message
mfd
misc
mmc
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-03-16 07:56:58 -07:00
nubus
of
oprofile
parisc
parport
pci PCI/MSI: Allow arch code to return the number of MSI-X available 2009-03-19 19:29:34 -07:00
pcmcia
platform acpi-wmi: unsigned cannot be less than 0 2009-03-16 00:38:24 -04:00
pnp
power
ps3
rapidio
regulator
rtc
s390
sbus
scsi
serial
sh
sn
spi
ssb
staging Staging: benet: remove driver now that it is merged in drivers/net/ 2009-03-18 09:22:17 -07:00
tc
telephony
thermal
uio
usb USB: storage: Unusual USB device Prolific 2507 variation added 2009-03-17 14:01:29 -07:00
uwb
video linux.conf.au 2009: Tuz 2009-03-16 07:55:37 -07:00
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile