Commit 254ecb16 authored by Christoph Hellwig's avatar Christoph Hellwig

sparc64/iommu: allow large DMA masks

We've been moving to a model where the device just sets the DMA mask
supported by it, instead of having to fallback to something it thinks
the platform might support.  Sparc64 is the remaining holdout forcing
drivers to supply a matching mask.  Change dma_4u_supported to just
check if the supplied dma mask is large enough as nothing in the
iommu.c code (or the core DMA code) actually looks at the DMA mask
later on.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c54fc984
......@@ -748,11 +748,9 @@ static int dma_4u_supported(struct device *dev, u64 device_mask)
if (ali_sound_dma_hack(dev, device_mask))
return 1;
if (device_mask > DMA_BIT_MASK(32))
if (device_mask < iommu->dma_addr_mask)
return 0;
if ((device_mask & iommu->dma_addr_mask) == iommu->dma_addr_mask)
return 1;
return 0;
return 1;
}
static const struct dma_map_ops sun4u_dma_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment