OF: Can't handle multiple dma-ranges with different offsets

From: Chris Packham
Date: Wed Jul 22 2020 - 00:19:53 EST


Hi,

I've just fired up linux kernel v5.7 on a p2040 based system and I'm
getting the following new warning

OF: Can't handle multiple dma-ranges with different offsets on
node(/pcie@ffe202000)
OF: Can't handle multiple dma-ranges with different offsets on
node(/pcie@ffe202000)

The warning itself was added in commit 9d55bebd9816 ("of/address:
Support multiple 'dma-ranges' entries") but I gather it's pointing out
something about the dts. My boards dts is based heavily on p2041rdb.dts
and the relevant pci2 section is identical (reproduced below for reference).

ÂÂÂ pci2: pcie@ffe202000 {
ÂÂÂ ÂÂÂ reg = <0xf 0xfe202000 0 0x1000>;
ÂÂÂ ÂÂÂ ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000
ÂÂÂ ÂÂÂ ÂÂÂ Â 0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
ÂÂÂ ÂÂÂ pcie@0 {
ÂÂÂ ÂÂÂ ÂÂÂ ranges = <0x02000000 0 0xe0000000
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ Â 0x02000000 0 0xe0000000
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ Â 0 0x20000000

ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ Â 0x01000000 0 0x00000000
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ Â 0x01000000 0 0x00000000
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ Â 0 0x00010000>;
ÂÂÂ ÂÂÂ };
ÂÂÂ };

I haven't noticed any ill effect (aside from the scary message). I'm not
sure if there's something missing in the dts or in the code that checks
the ranges. Any guidance would be appreciated.

Thanks,
Chris