lkml.org 
[lkml]   [2020]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/2] arm64: dts: broadcom: clear the warnings caused by empty dma-ranges
From
Date
On 10/16/20 4:01 AM, Arnd Bergmann wrote:
> On Fri, Oct 16, 2020 at 11:09 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>
>> The scripts/dtc/checks.c requires that the node have empty "dma-ranges"
>> property must have the same "#address-cells" and "#size-cells" values as
>> the parent node. Otherwise, the following warnings is reported:
>>
>> arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \
>> (dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \
>> its #address-cells (1) differs from / (2)
>> arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \
>> (dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \
>> its #size-cells (1) differs from / (2)
>>
>> Arnd Bergmann figured out why it's necessary:
>> Also note that the #address-cells=<1> means that any device under
>> this bus is assumed to only support 32-bit addressing, and DMA will
>> have to go through a slow swiotlb in the absence of an IOMMU.
>>
>> Suggested-by: Arnd Bergmann <arnd@arndb.de>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> I see that at least the 'bcd' and 'xhci' devices in fact try to
> use 64-bit DMA. It would be good to test this on actual
> hardware to ensure that it works correctly when this is enabled.
>
> Ideally avoiding the swiotlb bounce buffering should only
> make it faster here, but there are many chips on which
> 64-bit DMA is broken in some form.

Is this change really an improvement though? This 'usb' pseudo bus node
could just keep being defined with #address-cells = <1> and #size-cells
= <1> so as to satisfy the 'reg' definition however we could just adjust
dma-ranges to indicate full 64-bit addressing capability. Would not that
work?
--
Florian

\
 
 \ /
  Last update: 2020-10-16 18:49    [W:0.144 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site