powerpc/powernv: Reserve additional space for IOV BAR, with m64_per_iov supported
authorWei Yang <weiyang@linux.vnet.ibm.com>
Wed, 25 Mar 2015 08:23:58 +0000 (16:23 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 31 Mar 2015 02:02:38 +0000 (13:02 +1100)
commit5b88ec228498b7d41de6599eca12cc0032056e3f
tree9ef87bc8413673daf8a074c8baf0f052eb03950c
parent781a868f3136c6eb8e8c5c19d148416d7da86610
powerpc/powernv: Reserve additional space for IOV BAR, with m64_per_iov supported

M64 aperture size is limited on PHB3.  When the IOV BAR is too big, this
will exceed the limitation and failed to be assigned.

Introduce a different mechanism based on the IOV BAR size:

  - if IOV BAR size is smaller than 64MB, expand to total_pe
  - if IOV BAR size is bigger than 64MB, roundup power2

[bhelgaas: make dev_printk() output more consistent, use PCI_SRIOV_NUM_BARS]
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/pci-bridge.h
arch/powerpc/platforms/powernv/pci-ioda.c