summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-07-20 19:24:15 +0300
committerBjorn Helgaas <bhelgaas@google.com>2026-07-22 15:50:44 -0500
commit5012a69532081deb36f05e39511afb77edfabede (patch)
treee50804c828ce6f2f7a03e55c4465d1e21e535936 /scripts/Makefile.thinlto
parentdc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff)
downloadlinux-stable-5012a69532081deb36f05e39511afb77edfabede.tar.gz
linux-stable-5012a69532081deb36f05e39511afb77edfabede.zip
PCI: Do not add hotplug reservation multiple times
In nested topologies, hotplug reservations get added multiple times into the bridge window higher up in the hierarchy. Adding reservations for intermediate level bridges does not seem very useful because the hotplug is going to add device at a leaf. Accounting the hotplug reservation multiple times results in larger than expected bridge window size that may lead to assignment failures as shown in this log: pci_bus 0000:0a: root bus resource [mem 0x10a00000-0x10c00fff window] pci 0000:0a:00.0: BAR 0 [mem 0x10c00000-0x10c00fff] pci 0000:0a:00.0: bridge window [mem 0x10a00000-0x10bfffff] pci 0000:0b:00.0: bridge window [mem 0x10a00000-0x10bfffff] pci 0000:0c:02.0: bridge window [mem 0x10a00000-0x10bfffff] pci 0000:0c:02.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 0d] add_size 200000 add_align 100000 pci 0000:0c:02.0: bridge window [mem 0x00100000-0x000fffff] to [bus 0d] add_size 200000 add_align 100000 pci 0000:0b:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 0c-0d] add_size 200000 add_align 100000 pci 0000:0b:00.0: bridge window [mem 0x00100000-0x000fffff] to [bus 0c-0d] add_size 200000 add_align 100000 pci 0000:0a:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 0b-0d] add_size 400000 add_align 100000 pci 0000:0a:00.0: bridge window [mem 0x00100000-0x000fffff] to [bus 0b-0d] add_size 400000 add_align 100000 pci 0000:0a:00.0: bridge window [mem size 0x00400000]: can't assign; no space pci 0000:0a:00.0: bridge window [mem size 0x00400000]: failed to assign pci 0000:0a:00.0: bridge window [mem size 0x00400000 64bit pref]: can't assign; no space pci 0000:0a:00.0: bridge window [mem size 0x00400000 64bit pref]: failed to assign The problem stems from calculate_memsize() that calculates size first and then adds childen size: size = max(0, 2M) + 2M Alter the logic to first account for the children size before applying the hotplug reservation to not add hotplug reservation multiple times on different levels of a nested topology. As a result, the size calculation becomes: size = max(0 + 2M, 2M) Reported-by: Eric Auger <eauger@redhat.com> Link: https://lore.kernel.org/linux-pci/f23946f2-06ac-4607-8f2c-3ffbc52b627a@redhat.com/ Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260720162416.5771-1-ilpo.jarvinen@linux.intel.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions