TencentOS-kernel/drivers/pci
Lei Chen b5d85c9684 PCI: Probe bridge window attributes once at enumeration-time
upstream: 51c48b310183ab6ba5419edfc6a8de889cc04521

pci_bridge_check_ranges() determines whether a bridge supports the optional
I/O and prefetchable memory windows and sets the flag bits in the bridge
resources.  This *could* be done once during enumeration except that the
resource allocation code completely clears the flag bits, e.g., in the
pci_assign_unassigned_bridge_resources() path.

The problem with pci_bridge_check_ranges() in the resource allocation path
is that we may allocate resources after devices have been claimed by
drivers, and pci_bridge_check_ranges() *changes* the window registers to
determine whether they're writable.  This may break concurrent accesses to
devices behind the bridge.

Add a new pci_read_bridge_windows() to determine whether a bridge supports
the optional windows, call it once during enumeration, remember the
results, and change pci_bridge_check_ranges() so it doesn't touch the
bridge windows but sets the flag bits based on those remembered results.

Signed-off-by: Lei Chen <lennychen@tencent.com>
2020-12-25 15:38:45 +08:00
..
dwc Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
endpoint Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
host Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
hotplug Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pcie Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
switch Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
Kconfig Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
Makefile Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
access.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
ats.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
bus.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
ecam.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
host-bridge.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
hotplug-pci.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
htirq.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
iov.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
irq.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
mmap.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
msi.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
of.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pci-acpi.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pci-driver.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pci-label.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pci-mid.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pci-stub.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pci-sysfs.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pci.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
pci.h Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
probe.c PCI: Probe bridge window attributes once at enumeration-time 2020-12-25 15:38:45 +08:00
proc.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
quirks.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
remove.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
rom.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
search.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
setup-bus.c PCI: Probe bridge window attributes once at enumeration-time 2020-12-25 15:38:45 +08:00
setup-irq.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
setup-res.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
slot.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
syscall.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
vc.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
vpd.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00
xen-pcifront.c Init Repo base on 4.14.105 long term, and add base tlinux kernel interfaces 2020-01-02 10:51:04 +08:00