Re: 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-25T10:11:21Z

On Sat, 2025-10-18 at 10:14 +0200, Klaus Kudielka wrote:

[...]

> 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.

In the meantime, I stared a bit at the logs, and at the code.

WITH the offending commit, I see TWO identical lines before the WARNING:

> [    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

So, this part of pbus_size_mem() now seems to be called *TWICE* for the same bridge window:

add_to_list(realloc_head, bus->self, b_res, size1-size0, add_align);
pci_info(bus->self, "bridge window %pR to %pR add_size %llx add_align %llx\n",
b_res, &bus->busn_res,
(unsigned long long) (size1 - size0),
(unsigned long long) add_align);

WITHOUT the offending commit, I see only one line, and no WARNING.
> [    0.027405] pci 0000:00:03.0: bridge window [mem 0x00200000-0x003fffff] to [bus 02] add_size 200000 add_align 200000

This behavior change really looks suspicious to me (maybe resulting in two identical entries in the realloc_list).
Does that ring any bell?

Thanks, Klaus