diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-22 11:38:27 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-06-28 06:54:46 -0700 |
commit | 5860acc1a905b05c14e9ed9e22c20aad1a72554a (patch) | |
tree | c7de41ef603b7f179b06241ca055966e65dcc995 /drivers/iommu | |
parent | 418a7a7e4f05f36d6e4ab5b8548ea71f0b602140 (diff) | |
download | op-kernel-dev-5860acc1a905b05c14e9ed9e22c20aad1a72554a.zip op-kernel-dev-5860acc1a905b05c14e9ed9e22c20aad1a72554a.tar.gz |
x86: remove arch specific dma_supported implementation
And instead wire it up as method for all the dma_map_ops instances.
Note that this also means the arch specific check will be fully instead
of partially applied in the AMD iommu driver.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 2 | ||||
-rw-r--r-- | drivers/iommu/intel-iommu.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index d41280e..521fdf2d 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2731,6 +2731,8 @@ free_mem: */ static int amd_iommu_dma_supported(struct device *dev, u64 mask) { + if (!x86_dma_supported(dev, mask)) + return 0; return check_device(dev); } diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index fc2765c..53cc0a3 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3981,6 +3981,9 @@ struct dma_map_ops intel_dma_ops = { .map_page = intel_map_page, .unmap_page = intel_unmap_page, .mapping_error = intel_mapping_error, +#ifdef CONFIG_X86 + .dma_supported = x86_dma_supported, +#endif }; static inline int iommu_domain_cache_init(void) |