mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-28 02:41:43 +00:00
dma-mapping: reliably inform about DMA support for IOMMU
If the DMA IOMMU path is going to be used, the appropriate check should
return that DMA is supported.
Fixes: b5c58b2fdc ("dma-mapping: direct calls for dma-iommu")
Closes: https://lore.kernel.org/all/181e06ff-35a3-434f-b505-672f430bd1cb@notapiano
Reported-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> #KernelCI
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
038eb433dc
commit
f45cfab28f
@ -843,6 +843,9 @@ static int dma_supported(struct device *dev, u64 mask)
|
||||
|
||||
if (WARN_ON(ops && use_dma_iommu(dev)))
|
||||
return false;
|
||||
|
||||
if (use_dma_iommu(dev))
|
||||
return true;
|
||||
/*
|
||||
* ->dma_supported sets the bypass flag, so we must always call
|
||||
* into the method here unless the device is truly direct mapped.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user