Commit Message

On some powerpc platforms, device BARs need to be assigned to separate
"segments" of the address space in order for the error isolation and HW
virtualization mechanisms (EEH) to work properly. Those "segments" have
a minimum size that can be fairly large (16M). In order to be able to
use the generic resource assignment code rather than re-inventing our
own, we chose to group devices by bus. That way, a simple change of the
minimum alignment requirements of resources assigned to PCI to PCI (P2P)
bridges is enough to ensure that all BARs for devices below those bridges
will fit into contiguous sets of segments and there will be no overlap.
This patch provides a way for the host bridge to override the default
alignment values used by the resource allocation code for that purpose.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>Reviewed-by: Ram Pai <linuxram@us.ibm.com>Reviewed-by: Richard Yang <weiyang@linux.vnet.ibm.com>
---
drivers/pci/probe.c | 5 +++++
drivers/pci/setup-bus.c | 28 +++++++++++++++++++++-------
include/linux/pci.h | 8 ++++++++
3 files changed, 34 insertions(+), 7 deletions(-)