powerpc/powernv: replace the hard coded boundary with gate
authorWei Yang <weiyang@linux.vnet.ibm.com>
Thu, 22 Oct 2015 01:22:17 +0000 (09:22 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 10 Feb 2016 01:04:57 +0000 (12:04 +1100)
commitf2dd0afeea0ed0e740c4b066c76a556a8b870e58
tree9e455698169dce902847adbe75ff378d489bedef
parentee8222fe95e40ade9f50b852095d4626631ebbbe
powerpc/powernv: replace the hard coded boundary with gate

At the moment 64bit-prefetchable window can be maximum 64GB, which is
currently got from device tree. This means that in shared mode the maximum
supported VF BAR size is 64GB/256=256MB. While this size could exhaust the
whole 64bit-prefetchable window. This is a design decision to set a
boundary to 64MB of the VF BAR size. Since VF BAR size with 64MB would
occupy a quarter of the 64bit-prefetchable window, this is affordable.

This patch replaces magic limit of 64MB with "gate", which is 1/4 of the
M64 Segment Size(m64_segsize >> 2) and adds comment to explain the reason
for it.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Reviewed-by: Gavin Shan <gwshan@linux.vent.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