Refactor PCI resource allocation
authorrstone <rstone@FreeBSD.org>
Sun, 1 Mar 2015 00:39:33 +0000 (00:39 +0000)
committerrstone <rstone@FreeBSD.org>
Sun, 1 Mar 2015 00:39:33 +0000 (00:39 +0000)
commiteec79e939ebadf0bf9dd6f64959a689f8902c587
tree8d5ed5ffa5e339e30c09bdfc915eefabddf21160
parente228d5e92d9be44de199031eb339c8253de7dc61
Refactor PCI resource allocation

Refactor PCI resource allocation code to allow a request for a
memory-mapped I/O window that is a multiple of a requested size.
This is needed by the SR-IOV code because the VF BARs are all
allocated contiguously.  We can't just allocate a resource that is
a multiple of a single VF BAR because the size of an allocation
implies its alignment requirement.

Differential Revision: https://reviews.freebsd.org/D71
Reviewed by: jhb
MFC after:  1 month
Sponsored by: Sandvine Inc.
sys/dev/pci/pci.c
sys/dev/pci/pci_private.h