Re: [PATCH v3 0/9] dmaengine: Support bus widths of 32 bytes and above

From: Nuno Sá

Date: Mon Aug 31 2026 - 14:36:23 EST


On Mon, Aug 31, 2026 at 04:50:33PM +0300, Andy Shevchenko wrote:
> On Mon, Aug 31, 2026 at 12:46:37PM +0100, Nuno Sá wrote:
> > The DMA engine slave capabilities advertise the supported source and
> > destination bus widths through src_addr_widths / dst_addr_widths. These
> > are plain u32 bitmasks where a set bit's position equals the
> > corresponding enum dma_slave_buswidth value, e.g.
> > DMA_SLAVE_BUSWIDTH_4_BYTES sets bit 4.
> >
> > The consequence is that widths of 32 bytes and above cannot be
> > represented at all: DMA_SLAVE_BUSWIDTH_32/64/128_BYTES would need bits
> > 32, 64 and 128, which do not fit in a u32. Hardware with wider data
> > paths is becoming common, so add a representation that can express these
> > widths while still using enum dma_slave_buswidth.
> >
> > This series switches consumers and a small set of producers to the new
> > bus width capabilities, represented by a dma_buswidth_mask_t modeled
> > after dma_cap_mask_t. The legacy dma_device u32 fields are kept for now
> > so the remaining DMA controller drivers can be converted incrementally:
> > dma_async_device_register() folds a legacy-only producer's u32 into the
> > mask, so consumers only ever have to look at the mask.
> >
> > The new interface lives in include/linux/dma/engine/{types,widthmask}.h
> > rather than in linux/dmaengine.h, so that only its users pay for the
> > linux/bitmap.h include. Every accessor takes a dma_buswidth_mask_t,
> > which means the interface will not change when the legacy fields are
> > eventually dropped.
> >
> > Once the remaining producers are converted, the legacy dma_device
> > src/dst_addr_widths fields can be removed as a final cleanup.
> >
> > This issue was discussed before here:
> >
> > https://lore.kernel.org/dmaengine/abkoXXbaxaiqbBuX@vaman/
>
> Thanks, this version looks like the right approach. I have looked at a couple
> of patches and only the first one needs a bit of work, the rest looks nice!

It does! Once this lands, I do intend to do the same separation for the
caps_mask so that we can drop bitmap from dmaengine.h

- Nuno Sá

>
> --
> With Best Regards,
> Andy Shevchenko
>
>