Re: [PATCH 09/24] serial: 8250: 8250_bcm7271: fix DMA address truncation to 32 bits
From: Arnd Bergmann
Date: Tue Oct 27 2026 - 14:39:16 EST
On Tue, Oct 27, 2026, at 18:19, Florian Fainelli wrote:
> On 10/27/26 10:14, Andy Shevchenko wrote:
>> On Tue, Oct 27, 2026 at 09:41:17AM -0700, Florian Fainelli wrote:
>> You never know this. The use of u64 is simple as that: it goes to HW as 64-bit
>> value no matter what. Note, in the past we used to have a problematic use of
>> dma_addr_t exactly due to its dependency on the data bus size when programming
>> HW, and hence, based on my experience, I hardly recommend not to use dma_addr_t
>> in this case, use plain fixed u64.
>
> It's not a hot path where optimizing for bus transactions would make
> sense, so I guess it's fine to use u64 and have the two halves
> programmed accordingly.
I would suggest also setting a 64-bit dma mask in this case. The
reason that the temporary 32-bit address was always fine is that
dma_alloc_coherent() is limited to a 32-bit address by default.
Arnd