[PATCH] noatomic
Chris Wilson
chris at chris-wilson.co.uk
Tue Jan 12 21:54:56 UTC 2021
---
drivers/iommu/dma-iommu.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 4078358ed66e..76ca1300f54f 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -1025,15 +1025,19 @@ static int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg,
}
iova = iommu_dma_alloc_iova(domain, iova_len, dma_get_mask(dev), dev);
- if (!iova)
+ if (!iova) {
+ pr_err("iommu_dma_alloc_iova failed\n");
goto out_restore_sg;
+ }
/*
* We'll leave any physical concatenation to the IOMMU driver's
* implementation - it knows better than we do.
*/
- if (iommu_map_sg_atomic(domain, iova, sg, nents, prot) < iova_len)
+ if (iommu_map_sg(domain, iova, sg, nents, prot) < iova_len) {
+ pr_err("iommu_map_sg failed\n");
goto out_free_iova;
+ }
return __finalise_sg(dev, sg, nents, iova);
--
2.20.1
More information about the Intel-gfx-trybot
mailing list