linux-stable/drivers/pci/host
Thierry Reding 41534e5378 PCI: tegra: Implement a proper resource hierarchy
Currently the resource hierarchy generated from the PCIe host bridge is
completely flat:

    $ cat /proc/iomem
    00000000-00000fff : /pcie-controller@00003000/pci@1,0
    00003000-000037ff : pads
    00003800-000039ff : afi
    10000000-1fffffff : cs
    28000000-28003fff : r8169
    28004000-28004fff : r8169
    ...

The host bridge driver doesn't request all the resources that are used.
Windows allocated to each of the root ports aren't tracked, so there is no
way for resources allocated to individual devices to be matched up with the
correct parent resource by the PCI core.

This patch addresses this in two steps.  It first takes the union of all
regions associated with the PCIe host bridge (control registers, root port
registers, configuration space, I/O and prefetchable as well as non-
prefetchable memory regions) and uses it as the new root of the resource
hierarchy.

Subsequently, regions are allocated from within this new root resource so
that the resource tree looks much more like what's expected:

    # cat /proc/iomem
    00000000-3fffffff : /pcie-controller@00003000
      00000000-00000fff : /pcie-controller@00003000/pci@1,0
      00003000-000037ff : pads
      00003800-000039ff : afi
      10000000-1fffffff : cs
      20000000-27ffffff : non-prefetchable
      28000000-3fffffff : prefetchable
        28000000-280fffff : PCI Bus 0000:01
          28000000-28003fff : 0000:01:00.0
            28000000-28003fff : r8169
          28004000-28004fff : 0000:01:00.0
            28004000-28004fff : r8169
    ...

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-09-04 14:49:26 -06:00
..
Kconfig PCI changes for v3.17 (part 3): 2014-08-19 09:45:31 -05:00
Makefile PCI changes for v3.17 (part 3): 2014-08-19 09:45:31 -05:00
pci-dra7xx.c PCI: dra7xx: Add TI DRA7xx PCIe driver 2014-07-22 15:26:24 -06:00
pci-exynos.c Merge branches 'pci/host-designware', 'pci/host-imx6', 'pci/host-mvebu' and 'pci/host-tegra' into next 2014-06-03 08:45:42 -06:00
pci-host-generic.c PCI: generic: Fix GPL v2 license string typo 2014-07-15 15:07:46 -06:00
pci-imx6.c Merge branches 'pci/host-designware', 'pci/host-imx6', 'pci/host-mvebu' and 'pci/host-tegra' into next 2014-06-03 08:45:42 -06:00
pci-mvebu.c PCI: mvebu: Fix GPL v2 license string typo 2014-07-15 15:01:05 -06:00
pci-rcar-gen2.c PCI: rcar: Add gen2 device tree support 2014-05-28 07:47:55 -06:00
pci-tegra.c PCI: tegra: Implement a proper resource hierarchy 2014-09-04 14:49:26 -06:00
pcie-designware.c PCI: designware: Add MSI-related pcie_host_ops for v3.65 hardware 2014-07-22 16:47:29 -06:00
pcie-designware.h PCI: designware: Add MSI-related pcie_host_ops for v3.65 hardware 2014-07-22 16:47:29 -06:00
pcie-rcar.c PCI: rcar: Fix GPL v2 license string typo 2014-07-15 15:06:12 -06:00
pcie-spear13xx.c PCI: spear: Remove spear13xx_pcie_remove() 2014-07-20 12:27:50 -07:00