diff options
| author | Ilpo Järvinen <[email protected]> | 2025-10-27 13:24:23 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2025-10-31 20:07:21 +0000 |
| commit | 437aa64c8e32b724fc6d60100ef0eb313d32c88f (patch) | |
| tree | e1cf7b7dd0126e90d6719065d0e8e8e294bc3c1c /lib/mpi/mpi-scan.c | |
| parent | Revert "PCI: qcom: Remove custom ASPM enablement code" (diff) | |
| download | kernel-437aa64c8e32b724fc6d60100ef0eb313d32c88f.tar.gz kernel-437aa64c8e32b724fc6d60100ef0eb313d32c88f.zip | |
PCI: Do not size non-existing prefetchable window
pbus_size_mem() should only be called for bridge windows that exist but
__pci_bus_size_bridges() may point 'pref' to a resource that does not exist
(has zero flags) in case of non-root buses.
When prefetchable bridge window does not exist, the same non-prefetchable
bridge window is sized more than once which may result in duplicating
entries into the realloc_head list. Duplicated entries are shown in this
log and trigger a WARN_ON() because realloc_head had residual entries after
the resource assignment algorithm:
pci 0000:00:03.0: [11ab:6820] type 01 class 0x060400 PCIe Root Port
pci 0000:00:03.0: PCI bridge to [bus 00]
pci 0000:00:03.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:03.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000
pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000
pci 0000:00:03.0: bridge window [mem 0xe0000000-0xe03fffff]: assigned
pci 0000:00:03.0: PCI bridge to [bus 02]
pci 0000:00:03.0: bridge window [mem 0xe0000000-0xe03fffff]
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/pci/setup-bus.c:2373 pci_assign_unassigned_root_bus_resources+0x1bc/0x234
Check resource flags of 'pref' and only size the prefetchable window if the
resource has the IORESOURCE_PREFETCH flag.
Fixes: ae88d0b9c57f ("PCI: Use pbus_select_window_for_type() during mem window sizing")
Reported-by: Klaus Kudielka <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Signed-off-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Tested-by: Klaus Kudielka <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'lib/mpi/mpi-scan.c')
0 files changed, 0 insertions, 0 deletions
