powerpc/powernv: Pick M64 PEs based on BARs
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Fri, 19 Jun 2015 02:26:19 +0000 (12:26 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 13 Jul 2015 06:12:01 +0000 (16:12 +1000)
commit26ba248d52854b267a3d728f2281efa89259eae4
treeb1d3acdd2f91574c96e6bb176d171c472c689b26
parentd1203852dfbbbd043bbd831761c117af752d1eda
powerpc/powernv: Pick M64 PEs based on BARs

On PHB3, PE might be reserved in advance to reflect the M64 segments
consumed by the PE according to M64 BARs (exclude VF BARs) of the PCI
devices included in the PE. The PE is picked based on M64 BARs instead
of the bridge's M64 windows, which might include VF BARs. Otherwise,
wrong PE could be picked.

The patch calculates the used M64 segments and PE numbers according to
the M64 BARs, excluding VF BARs, of PCI devices in one particular PE,
instead of the bridge's M64 windows. Then the right PE number is picked.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c
arch/powerpc/platforms/powernv/pci.h