summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-02-15 13:27:30 +0100
committerChristoph Hellwig <hch@lst.de>2019-02-20 07:28:58 -0700
commit254ecb1601ebbdf0eeda4156f4c55254cb9addaf (patch)
tree73a4d602775a2080e1ddc215ea96ee87a5952caf /arch/sparc/kernel
parentc54fc984dae5fb0007ddfc46dabde6631735689d (diff)
downloadlinux-0-day-254ecb1601ebbdf0eeda4156f4c55254cb9addaf.tar.gz
linux-0-day-254ecb1601ebbdf0eeda4156f4c55254cb9addaf.tar.xz
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: Christoph Hellwig <hch@lst.de> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/iommu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c
index 0c253f1c852ef..4ae7388b1bff4 100644
--- a/arch/sparc/kernel/iommu.c
+++ b/arch/sparc/kernel/iommu.c
@@ -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 = {