LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
* OF: Can't handle multiple dma-ranges with different offsets
@ 2020-07-22  4:19 Chris Packham
  2020-07-22 22:11 ` Chris Packham
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Packham @ 2020-07-22  4:19 UTC (permalink / raw)
  To: robh+dt, frowand.list, mpe, benh, paulus, christophe.leroy
  Cc: devicetree, linuxppc-dev, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: OF: Can't handle multiple dma-ranges with different offsets
  2020-07-22  4:19 OF: Can't handle multiple dma-ranges with different offsets Chris Packham
@ 2020-07-22 22:11 ` Chris Packham
  2020-07-31  0:10   ` Chris Packham
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Packham @ 2020-07-22 22:11 UTC (permalink / raw)
  To: robh+dt, frowand.list, mpe, benh, paulus, christophe.leroy
  Cc: devicetree, linuxppc-dev, linux-kernel


On 22/07/20 4:19 pm, Chris Packham wrote:
> 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.

I've also just checked the T2080RDB on v5.7.9 which shows a similar issue

OF: Can't handle multiple dma-ranges with different offsets on 
node(/pcie@ffe250000)
OF: Can't handle multiple dma-ranges with different offsets on 
node(/pcie@ffe250000)
pcieport 0000:00:00.0: Invalid size 0xfffff9 for dma-range
pcieport 0000:00:00.0: AER: enabled with IRQ 21
OF: Can't handle multiple dma-ranges with different offsets on 
node(/pcie@ffe270000)
OF: Can't handle multiple dma-ranges with different offsets on 
node(/pcie@ffe270000)
pcieport 0001:00:00.0: Invalid size 0xfffff9 for dma-range
pcieport 0001:00:00.0: AER: enabled with IRQ 23



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: OF: Can't handle multiple dma-ranges with different offsets
  2020-07-22 22:11 ` Chris Packham
@ 2020-07-31  0:10   ` Chris Packham
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Packham @ 2020-07-31  0:10 UTC (permalink / raw)
  To: robh+dt, frowand.list, mpe, benh, paulus, christophe.leroy
  Cc: devicetree, linuxppc-dev, linux-kernel


On 23/07/20 10:11 am, Chris Packham wrote:
>
> On 22/07/20 4:19 pm, Chris Packham wrote:
>> 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.
>
> I've also just checked the T2080RDB on v5.7.9 which shows a similar issue
>
> OF: Can't handle multiple dma-ranges with different offsets on 
> node(/pcie@ffe250000)
> OF: Can't handle multiple dma-ranges with different offsets on 
> node(/pcie@ffe250000)
> pcieport 0000:00:00.0: Invalid size 0xfffff9 for dma-range
> pcieport 0000:00:00.0: AER: enabled with IRQ 21
> OF: Can't handle multiple dma-ranges with different offsets on 
> node(/pcie@ffe270000)
> OF: Can't handle multiple dma-ranges with different offsets on 
> node(/pcie@ffe270000)
> pcieport 0001:00:00.0: Invalid size 0xfffff9 for dma-range
> pcieport 0001:00:00.0: AER: enabled with IRQ 23

I've been doing a bit more digging. The dma-ranges property is not in 
the dts/dtb. It's actually inserted by u-boot via ft_fsl_pci_setup().

Here's some output from my T2080RDB

root@linuxbox ~]# xxd -g4 
/sys/firmware/devicetree/base/pcie@ffe240000/dma-ranges
0000000: 02000000 00000000 df000007 0000000f  ................
0000010: fe000000 00000000 00fffff9 42000000  ............B...
0000020: 00000000 00000000 00000000 00000000  ................
0000030: 00000000 df000007 43000000 00000010  ........C.......
0000040: 00000000 00000000 00000000 00000001  ................
0000050: 00000000                             ....

I'm still wondering how best to deal with this. Hopefully without 
needing to deploy a u-boot update.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22  4:19 OF: Can't handle multiple dma-ranges with different offsets Chris Packham
2020-07-22 22:11 ` Chris Packham
2020-07-31  0:10   ` Chris Packham

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git