]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Add support for root bus sizing
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>
Sat, 14 Mar 2020 19:43:55 +0000 (19:43 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 30 Mar 2020 14:52:34 +0000 (09:52 -0500)
commit8f9f6d6648ea62534f720e0fb72d77bec23a513b
treeea6775f09df6d463d4f7f3047246701a9f644bb2
parentcbaad4e2dceb0d3ab5da4a2485cd31534b5574c1
PCI: Add support for root bus sizing

In certain cases we should be able to enumerate IO and MEM ranges of all
PCI devices installed in the system, and then set respective host bridge
apertures basing on calculated size and alignment.  Particularly when
firmware is broken and fails to assign bridge windows properly, like on
Alpha UP1500 platform.

Actually, almost everything is already in place, and required changes are
minimal:

- add "size_windows" flag to struct pci_host_bridge: when set, it
  instructs __pci_bus_size_bridges() to continue with the root bus;
- in the __pci_bus_size_bridges() path: add checks for bus->self,
  as it can legitimately be null for the root bus.

Link: https://lore.kernel.org/r/20200314194355.GA12510@mail.rc.ru
Tested-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/setup-bus.c
include/linux/pci.h