msi/pci: Adjust pci_alloc_msi method interface
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 27 Dec 2011 03:23:03 +0000 (11:23 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 27 Dec 2011 05:44:43 +0000 (13:44 +0800)
commit2c3d7ac8b794c14f1a14b7cf04c0c144a1aed6dd
tree21572322976994c2eb631322b71542e7797a871e
parent7b87350be06bbe28afbe743f8b189bcfce77c05a
msi/pci: Adjust pci_alloc_msi method interface

- The requested number of MSI messages is no longer adjusted in
  pci_alloc_msi_method(), instead, caller should adjust it.
- rids of the MSI SYS_RES_IRQ are explicitly returned to caller,
  instead of letting caller fill them based on the implied rules.
- MSI messages' target CPU auto-selection.
- Intead of reallocation using reduced number of MSI messages,
  we try to allocate the requested amount of MSI messages on
  different CPUs, if the desired CPU does not have enough vectors.
- The requested amount of MSI messages must be sane.
sys/bus/pci/pci.c
sys/bus/pci/pci_if.m
sys/bus/pci/pci_private.h
sys/bus/pci/pcivar.h
sys/platform/pc64/apic/ioapic_abi.c