• Yinghai Lu's avatar
    sparc/PCI: Support arbitrary host bridge address offset · b4a30448
    Yinghai Lu authored
    Add support for arbitrary bus address offset.  Previously we ignored the
    child (PCI) address in the "ranges" property and assumed it was always
    zero.  That means every host bridge window mapped to PCI bus address zero,
      pci_bus 0000:00: root bus resource [mem 0x2000000000000-0x200007fffffff] (bus address [0x00000000-0x7fffffff])
    But some systems have host bridge windows with non-zero child addresses, so
    parse the child address and compute the offset between the parent (CPU) and
    child (PCI) addresses.  This allows windows like these:
      /pci@305: PCI MEM [mem 0x2000000100000-0x200007effffff] offset 2000000000000
      pci_sun4v f02ae7f8: PCI host bridge to bus 0000:00
      pci_bus 0000:00: root bus resource [mem 0x2000000100000-0x200007effffff] (bus address [0x00100000-0x7effffff])
    [bhelgaas: changelog]
    Tested-by: default avatarKhalid Aziz <khalid.aziz@oracle.com>
    Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
    Cc: sparclinux@vger.kernel.org
pci_impl.h 5.44 KB