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 <[email protected]>
This commit is contained in:
Christoph Hellwig 2017-05-22 11:38:27 +02:00
commit 5860acc1a9
9 changed files with 13 additions and 11 deletions

View file

@ -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);
}

View file

@ -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)