Re: [PATCH 09/24] serial: 8250: 8250_bcm7271: fix DMA address truncation to 32 bits
From: Florian Fainelli
Date: Tue Oct 27 2026 - 12:53:26 EST
On 10/27/26 08:10, Andy Shevchenko wrote:
On Tue, Oct 27, 2026 at 12:06:35PM +0100, Greg Kroah-Hartman wrote:
The local variable daddr is declared as u32 but assigned from dma_addr_t
fields (priv->rx_addr and priv->tx_addr), which are 64-bit on ARM64.
This silently truncates the upper 32 bits, causing upper_32_bits(daddr)
to always produce zero when programming the UART DMA descriptor high
address registers. Change the type to dma_addr_t to preserve the full
DMA address.
Since this value goes to HW, it should be u64. Even on 32-bit machines there
are possibilities to cover a bigger address space / DMA space.
That is one way to go about it, but since the size of dma_addr_t follows ARCH_DMA_ADDR_T_64BIT, we could also take this patch, and also make the upper 32-bits programming conditional upon CONFIG_ARCH_DMA_ADDR_T_64BIT.
--
Florian