WARNING at drivers/pci/setup-bus.c:2373, bisected to "PCI: Use pbus_select_window_for_type() during mem window sizing"

Klaus Kudielka
2025-10-18T08:14:49Z

On Fri, 2025-08-29 at 16:11 +0300, Ilpo Järvinen wrote:
> __pci_bus_size_bridges() goes to great lengths of helping pbus_size_mem()
> in which types it should put into a particular bridge window, requiring
> passing up to three resource type into pbus_size_mem().
>
> Instead of having complex logic in __pci_bus_size_bridges() and a
> non-straightforward interface between those functions, use
> pbus_select_window_for_type() and pbus_select_window() to find the correct
> bridge window and compare if the resources belong to that window.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Hi,

this batch became mainline commit ae88d0b9c57f, and causes a warning when booting
on my Turris Omnia.

Device tree: arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
PCI driver: pci-mvebu
Hardware status: The joint mPCIe / mSATA slot carries an mSATA drive, the other
two mPCIe slots carry WiFi cards.

As far as I can tell, hardware is operating nominally, so the warning looks like
a false positive.

*** relevant section of the boot log, at ae88d0b9c57f (first bad commit) ***

[ 0.024347] mvebu-pcie soc:pcie: host bridge /soc/pcie ranges:
[ 0.024372] mvebu-pcie soc:pcie: MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
[ 0.024388] mvebu-pcie soc:pcie: MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[ 0.024401] mvebu-pcie soc:pcie: MEM 0x00f1044000..0x00f1045fff -> 0x0000044000
[ 0.024414] mvebu-pcie soc:pcie: MEM 0x00f1048000..0x00f1049fff -> 0x0000048000
[ 0.024427] mvebu-pcie soc:pcie: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[ 0.024439] mvebu-pcie soc:pcie: IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[ 0.024452] mvebu-pcie soc:pcie: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[ 0.024464] mvebu-pcie soc:pcie: IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[ 0.024476] mvebu-pcie soc:pcie: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0300000000
[ 0.024488] mvebu-pcie soc:pcie: IO 0xffffffffffffffff..0x00fffffffe -> 0x0300000000
[ 0.024500] mvebu-pcie soc:pcie: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0400000000
[ 0.024508] mvebu-pcie soc:pcie: IO 0xffffffffffffffff..0x00fffffffe -> 0x0400000000
[ 0.024698] mvebu-pcie soc:pcie: pcie1.0: Slot power limit 10.0W
[ 0.024890] mvebu-pcie soc:pcie: pcie2.0: Slot power limit 10.0W
[ 0.025099] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[ 0.025107] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.025114] pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
[ 0.025120] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[ 0.025125] pci_bus 0000:00: root bus resource [mem 0xf1044000-0xf1045fff] (bus address [0x00044000-0x00045fff])
[ 0.025135] pci_bus 0000:00: root bus resource [mem 0xf1048000-0xf1049fff] (bus address [0x00048000-0x00049fff])
[ 0.025139] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[ 0.025143] pci_bus 0000:00: root bus resource [io 0x1000-0xeffff]
[ 0.025262] pci 0000:00:02.0: [11ab:6820] type 01 class 0x060400 PCIe Root Port
[ 0.025277] pci 0000:00:02.0: PCI bridge to [bus 00]
[ 0.025284] pci 0000:00:02.0: bridge window [io 0x0000-0x0fff]
[ 0.025289] pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff]
[ 0.025484] /soc/pcie/pcie@2,0: Fixed dependency cycle(s) with /soc/pcie/pcie@2,0/interrupt-controller
[ 0.025524] pci 0000:00:03.0: [11ab:6820] type 01 class 0x060400 PCIe Root Port
[ 0.025537] pci 0000:00:03.0: PCI bridge to [bus 00]
[ 0.025543] pci 0000:00:03.0: bridge window [io 0x0000-0x0fff]
[ 0.025547] pci 0000:00:03.0: bridge window [mem 0x00000000-0x000fffff]
[ 0.025665] /soc/pcie/pcie@3,0: Fixed dependency cycle(s) with /soc/pcie/pcie@3,0/interrupt-controller
[ 0.026453] PCI: bus0: Fast back to back transfers disabled
[ 0.026459] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.026466] pci 0000:00:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.026538] pci 0000:01:00.0: [168c:002e] type 00 class 0x028000 PCIe Legacy Endpoint
[ 0.026577] pci 0000:01:00.0: BAR 0 [mem 0xc0000000-0xc000ffff 64bit]
[ 0.026669] pci 0000:01:00.0: supports D1
[ 0.026673] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[ 0.026783] PCI: bus1: Fast back to back transfers disabled
[ 0.026788] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 0.026860] pci 0000:02:00.0: [168c:003c] type 00 class 0x028000 PCIe Endpoint
[ 0.026898] pci 0000:02:00.0: BAR 0 [mem 0xc8000000-0xc81fffff 64bit]
[ 0.026909] pci 0000:02:00.0: ROM [mem 0xc8200000-0xc820ffff pref]
[ 0.026987] pci 0000:02:00.0: supports D1 D2
[ 0.027083] PCI: bus2: Fast back to back transfers disabled
[ 0.027088] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[ 0.027107] pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000
[ 0.027115] pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000
[ 0.027131] pci 0000:00:03.0: bridge window [mem 0xe0000000-0xe03fffff]: assigned
[ 0.027138] pci 0000:00:02.0: bridge window [mem 0xe0400000-0xe04fffff]: assigned
[ 0.027146] pci 0000:01:00.0: BAR 0 [mem 0xe0400000-0xe040ffff 64bit]: assigned
[ 0.027158] pci 0000:00:02.0: PCI bridge to [bus 01]
[ 0.027165] pci 0000:00:02.0: bridge window [mem 0xe0400000-0xe04fffff]
[ 0.027178] pci 0000:02:00.0: BAR 0 [mem 0xe0000000-0xe01fffff 64bit]: assigned
[ 0.027188] pci 0000:02:00.0: ROM [mem 0xe0200000-0xe020ffff pref]: assigned
[ 0.027194] pci 0000:00:03.0: PCI bridge to [bus 02]
[ 0.027199] pci 0000:00:03.0: bridge window [mem 0xe0000000-0xe03fffff]
[ 0.027208] ------------[ cut here ]------------
[ 0.027211] WARNING: CPU: 0 PID: 1 at drivers/pci/setup-bus.c:2373 pci_assign_unassigned_root_bus_resources+0x1bc/0x234
[ 0.027230] Modules linked in:
[ 0.027238] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.0-rc1+ #49 NONE
[ 0.027246] Hardware name: Marvell Armada 380/385 (Device Tree)
[ 0.027250] Call trace:
[ 0.027258] unwind_backtrace from show_stack+0x10/0x14
[ 0.027278] show_stack from dump_stack_lvl+0x50/0x64
[ 0.027288] dump_stack_lvl from __warn+0x7c/0xd4
[ 0.027301] __warn from warn_slowpath_fmt+0x158/0x15c
[ 0.027314] warn_slowpath_fmt from pci_assign_unassigned_root_bus_resources+0x1bc/0x234
[ 0.027328] pci_assign_unassigned_root_bus_resources from pci_host_probe+0x50/0xb8
[ 0.027341] pci_host_probe from platform_probe+0x48/0x84
[ 0.027351] platform_probe from really_probe+0xc8/0x2c8
[ 0.027364] really_probe from driver_probe_device+0x38/0x114
[ 0.027378] driver_probe_device from __driver_attach+0x9c/0x194
[ 0.027391] __driver_attach from bus_for_each_dev+0x60/0x94
[ 0.027404] bus_for_each_dev from bus_add_driver+0xc8/0x1e8
[ 0.027417] bus_add_driver from driver_register+0x84/0x138
[ 0.027426] driver_register from do_one_initcall+0x44/0x268
[ 0.027433] do_one_initcall from kernel_init_freeable+0x258/0x2c8
[ 0.027445] kernel_init_freeable from kernel_init+0x1c/0x130
[ 0.027458] kernel_init from ret_from_fork+0x14/0x28
[ 0.027466] Exception stack(0xf0831fb0 to 0xf0831ff8)
[ 0.027472] 1fa0: 00000000 00000000 00000000 00000000
[ 0.027477] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 0.027481] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 0.027485] ---[ end trace 0000000000000000 ]---
[ 0.027489] pci_bus 0000:00: resource 4 [mem 0xf1080000-0xf1081fff]
[ 0.027495] pci_bus 0000:00: resource 5 [mem 0xf1040000-0xf1041fff]
[ 0.027500] pci_bus 0000:00: resource 6 [mem 0xf1044000-0xf1045fff]
[ 0.027504] pci_bus 0000:00: resource 7 [mem 0xf1048000-0xf1049fff]
[ 0.027508] pci_bus 0000:00: resource 8 [mem 0xe0000000-0xe7ffffff]
[ 0.027512] pci_bus 0000:00: resource 9 [io 0x1000-0xeffff]
[ 0.027517] pci_bus 0000:01: resource 1 [mem 0xe0400000-0xe04fffff]
[ 0.027522] pci_bus 0000:02: resource 1 [mem 0xe0000000-0xe03fffff]

*** relevant section of the boot log, at 13016e15d595 (last good commit) ***

[ 0.024666] mvebu-pcie soc:pcie: host bridge /soc/pcie ranges:
[ 0.024690] mvebu-pcie soc:pcie: MEM 0x00f1080000..0x00f1081fff -> 0x0000080000
[ 0.024706] mvebu-pcie soc:pcie: MEM 0x00f1040000..0x00f1041fff -> 0x0000040000
[ 0.024719] mvebu-pcie soc:pcie: MEM 0x00f1044000..0x00f1045fff -> 0x0000044000
[ 0.024732] mvebu-pcie soc:pcie: MEM 0x00f1048000..0x00f1049fff -> 0x0000048000
[ 0.024745] mvebu-pcie soc:pcie: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[ 0.024757] mvebu-pcie soc:pcie: IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[ 0.024770] mvebu-pcie soc:pcie: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[ 0.024782] mvebu-pcie soc:pcie: IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[ 0.024794] mvebu-pcie soc:pcie: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0300000000
[ 0.024806] mvebu-pcie soc:pcie: IO 0xffffffffffffffff..0x00fffffffe -> 0x0300000000
[ 0.024818] mvebu-pcie soc:pcie: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0400000000
[ 0.024827] mvebu-pcie soc:pcie: IO 0xffffffffffffffff..0x00fffffffe -> 0x0400000000
[ 0.025022] mvebu-pcie soc:pcie: pcie1.0: Slot power limit 10.0W
[ 0.025210] mvebu-pcie soc:pcie: pcie2.0: Slot power limit 10.0W
[ 0.025451] mvebu-pcie soc:pcie: PCI host bridge to bus 0000:00
[ 0.025459] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.025466] pci_bus 0000:00: root bus resource [mem 0xf1080000-0xf1081fff] (bus address [0x00080000-0x00081fff])
[ 0.025472] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff])
[ 0.025477] pci_bus 0000:00: root bus resource [mem 0xf1044000-0xf1045fff] (bus address [0x00044000-0x00045fff])
[ 0.025482] pci_bus 0000:00: root bus resource [mem 0xf1048000-0xf1049fff] (bus address [0x00048000-0x00049fff])
[ 0.025487] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[ 0.025491] pci_bus 0000:00: root bus resource [io 0x1000-0xeffff]
[ 0.025617] pci 0000:00:02.0: [11ab:6820] type 01 class 0x060400 PCIe Root Port
[ 0.025633] pci 0000:00:02.0: PCI bridge to [bus 00]
[ 0.025639] pci 0000:00:02.0: bridge window [io 0x0000-0x0fff]
[ 0.025644] pci 0000:00:02.0: bridge window [mem 0x00000000-0x000fffff]
[ 0.025794] /soc/pcie/pcie@2,0: Fixed dependency cycle(s) with /soc/pcie/pcie@2,0/interrupt-controller
[ 0.025832] pci 0000:00:03.0: [11ab:6820] type 01 class 0x060400 PCIe Root Port
[ 0.025844] pci 0000:00:03.0: PCI bridge to [bus 00]
[ 0.025851] pci 0000:00:03.0: bridge window [io 0x0000-0x0fff]
[ 0.025855] pci 0000:00:03.0: bridge window [mem 0x00000000-0x000fffff]
[ 0.025968] /soc/pcie/pcie@3,0: Fixed dependency cycle(s) with /soc/pcie/pcie@3,0/interrupt-controller
[ 0.026757] PCI: bus0: Fast back to back transfers disabled
[ 0.026762] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.026769] pci 0000:00:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.026845] pci 0000:01:00.0: [168c:002e] type 00 class 0x028000 PCIe Legacy Endpoint
[ 0.026884] pci 0000:01:00.0: BAR 0 [mem 0xc0000000-0xc000ffff 64bit]
[ 0.026976] pci 0000:01:00.0: supports D1
[ 0.026980] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[ 0.027082] PCI: bus1: Fast back to back transfers disabled
[ 0.027087] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 0.027163] pci 0000:02:00.0: [168c:003c] type 00 class 0x028000 PCIe Endpoint
[ 0.027201] pci 0000:02:00.0: BAR 0 [mem 0xc8000000-0xc81fffff 64bit]
[ 0.027212] pci 0000:02:00.0: ROM [mem 0xc8200000-0xc820ffff pref]
[ 0.027290] pci 0000:02:00.0: supports D1 D2
[ 0.027381] PCI: bus2: Fast back to back transfers disabled
[ 0.027386] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[ 0.027405] pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000
[ 0.027423] pci 0000:00:03.0: bridge window [mem 0xe0000000-0xe03fffff]: assigned
[ 0.027430] pci 0000:00:02.0: bridge window [mem 0xe0400000-0xe04fffff]: assigned
[ 0.027438] pci 0000:01:00.0: BAR 0 [mem 0xe0400000-0xe040ffff 64bit]: assigned
[ 0.027450] pci 0000:00:02.0: PCI bridge to [bus 01]
[ 0.027457] pci 0000:00:02.0: bridge window [mem 0xe0400000-0xe04fffff]
[ 0.027470] pci 0000:02:00.0: BAR 0 [mem 0xe0000000-0xe01fffff 64bit]: assigned
[ 0.027481] pci 0000:02:00.0: ROM [mem 0xe0200000-0xe020ffff pref]: assigned
[ 0.027487] pci 0000:00:03.0: PCI bridge to [bus 02]
[ 0.027492] pci 0000:00:03.0: bridge window [mem 0xe0000000-0xe03fffff]
[ 0.027502] pci_bus 0000:00: resource 4 [mem 0xf1080000-0xf1081fff]
[ 0.027507] pci_bus 0000:00: resource 5 [mem 0xf1040000-0xf1041fff]
[ 0.027511] pci_bus 0000:00: resource 6 [mem 0xf1044000-0xf1045fff]
[ 0.027515] pci_bus 0000:00: resource 7 [mem 0xf1048000-0xf1049fff]
[ 0.027519] pci_bus 0000:00: resource 8 [mem 0xe0000000-0xe7ffffff]
[ 0.027523] pci_bus 0000:00: resource 9 [io 0x1000-0xeffff]
[ 0.027528] pci_bus 0000:01: resource 1 [mem 0xe0400000-0xe04fffff]
[ 0.027532] pci_bus 0000:02: resource 1 [mem 0xe0000000-0xe03fffff]

#regzbot introduced: ae88d0b9c57f

Thanks, Klaus