Re: [PATCH] dmaengine: sun6i: constrain descriptor addresses through the DMA mask
From: Frank Li
Date: Tue Oct 27 2026 - 12:12:37 EST
On Wed, Oct 21, 2026 at 03:11:29PM -0600, James Hilliard wrote:
> Descriptor allocations pass GFP_DMA32 to dma_pool_alloc(). The DMA API
> chooses the memory zone from the device address mask, rather than accepting
> zone-selection flags from the driver. These flags can also reach the pool
> metadata allocation and trigger a slab allocator warning, as observed on
> H616 when preparing the first UART receive-DMA chain.
>
> Set a 32-bit coherent DMA mask before creating the descriptor pool and
> remove GFP_DMA32 from its allocations. The driver does not encode the
> extra descriptor-address bits supported by some variants, so descriptor
> links must remain below 4 GiB. Keep the streaming mask unchanged for
> variants with wider source and destination addresses.
>
> Fixes: ec31c5c59492 ("dmaengine: sun6i: Add support for 34-bit physical addresses")
> Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
> ---
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>