From: Wei Yang Date: Wed, 25 Mar 2015 08:23:44 +0000 (+0800) Subject: PCI: Keep individual VF BAR size in struct pci_sriov X-Git-Tag: omap-for-v4.1/fixes-rc1~126^2~7^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e6c9122a6ec96d19f1db61e9750287d86b6829c;p=pandora-kernel.git PCI: Keep individual VF BAR size in struct pci_sriov Currently we don't store the individual VF BAR size. We calculate it when needed by dividing the PF's IOV resource size (which contains space for *all* the VFs) by total_VFs or by reading the BAR in the SR-IOV capability again. Keep the individual VF BAR size in struct pci_sriov.barsz[], add pci_iov_resource_size() to retrieve it, and use that instead of doing the division or reading the SR-IOV capability BAR. [bhelgaas: rename to "barsz[]", simplify barsz[] index computation, remove SR-IOV capability BAR sizing] Signed-off-by: Wei Yang Acked-by: Bjorn Helgaas Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed