]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: simplify the calculation of iov resource alignment
authorWei Yang <weiyang@linux.vnet.ibm.com>
Thu, 22 Oct 2015 01:22:15 +0000 (09:22 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 10 Feb 2016 01:04:55 +0000 (12:04 +1100)
commita519dc3f4890e2be2616b3d1caea2f156b08ba0c
treebff65b0d27d03f93ac5f371b056515b4b4b6d2f8
parentd7f0075017d841d6c959403f21398ed014add65a
powerpc/powernv: simplify the calculation of iov resource alignment

The alignment of IOV BAR on PowerNV platform is the total size of the IOV
BAR. No matter whether the IOV BAR is extended with number of
roundup_pow_of_two(total_vfs) or number of max PE number (256), the total
size could be calculated by (vfs_expanded * VF_BAR_size).

This patch simplifies the pnv_pci_iov_resource_alignment() by removing the
first case.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Acked-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c