Re: [RFC][PATCH] dma-mapping: align default segment_boundary_mask with dma_mask
From: Christoph Hellwig
Date: Mon Mar 16 2020 - 08:48:55 EST
On Fri, Mar 13, 2020 at 05:00:07PM -0700, Nicolin Chen wrote:
> @@ -736,7 +736,7 @@ static inline unsigned long dma_get_seg_boundary(struct device *dev)
> {
> if (dev->dma_parms && dev->dma_parms->segment_boundary_mask)
> return dev->dma_parms->segment_boundary_mask;
> - return DMA_BIT_MASK(32);
> + return (unsigned long)dma_get_mask(dev);
Just thinking out loud after my reply - shouldn't we just return ULONG_MAX
by default here to mark this as no limit?