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

2020-07-30 Thread Chris Packham

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 = <0x0200 0 0xe000 0xc 0x4000 0 0x2000
>>               0x0100 0 0x 0xf 0xf802 0 0x0001>;
>>         pcie@0 {
>>             ranges = <0x0200 0 0xe000
>>                   0x0200 0 0xe000
>>                   0 0x2000
>>
>>                   0x0100 0 0x
>>                   0x0100 0 0x
>>                   0 0x0001>;
>>         };
>>     };
>>
>> 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@ffe25)
> OF: Can't handle multiple dma-ranges with different offsets on 
> node(/pcie@ffe250000)
> pcieport :00:00.0: Invalid size 0xf9 for dma-range
> pcieport :00:00.0: AER: enabled with IRQ 21
> OF: Can't handle multiple dma-ranges with different offsets on 
> node(/pcie@ffe27)
> OF: Can't handle multiple dma-ranges with different offsets on 
> node(/pcie@ffe27)
> pcieport 0001:00:00.0: Invalid size 0xf9 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@ffe24/dma-ranges
000: 0200  df07 000f  
010: fe00  00f9 4200  B...
020:      
030:  df07 4300 0010  C...
040:    0001  
050:  

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


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

2020-07-22 Thread Chris Packham

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 = <0x0200 0 0xe000 0xc 0x4000 0 0x2000
>               0x0100 0 0x 0xf 0xf802 0 0x0001>;
>         pcie@0 {
>             ranges = <0x0200 0 0xe000
>                   0x0200 0 0xe000
>                   0 0x2000
>
>                   0x0100 0 0x
>                   0x0100 0 0x
>                   0 0x0001>;
>         };
>     };
>
> 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@ffe25)
OF: Can't handle multiple dma-ranges with different offsets on 
node(/pcie@ffe25)
pcieport :00:00.0: Invalid size 0xf9 for dma-range
pcieport :00:00.0: AER: enabled with IRQ 21
OF: Can't handle multiple dma-ranges with different offsets on 
node(/pcie@ffe27)
OF: Can't handle multiple dma-ranges with different offsets on 
node(/pcie@ffe27)
pcieport 0001:00:00.0: Invalid size 0xf9 for dma-range
pcieport 0001:00:00.0: AER: enabled with IRQ 23




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

2020-07-21 Thread Chris Packham
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 = <0x0200 0 0xe000 0xc 0x4000 0 0x2000
               0x0100 0 0x 0xf 0xf802 0 0x0001>;
         pcie@0 {
             ranges = <0x0200 0 0xe000
                   0x0200 0 0xe000
                   0 0x2000

                   0x0100 0 0x
                   0x0100 0 0x
                   0 0x0001>;
         };
     };

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