mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
iommu: Remove iommu_map_atomic()
There is only one call site and it can now just pass the GFP_ATOMIC to the normal iommu_map(). Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/2-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
1369459b2e
commit
4dc6376af5
@ -713,7 +713,7 @@ static dma_addr_t __iommu_dma_map(struct device *dev, phys_addr_t phys,
|
|||||||
if (!iova)
|
if (!iova)
|
||||||
return DMA_MAPPING_ERROR;
|
return DMA_MAPPING_ERROR;
|
||||||
|
|
||||||
if (iommu_map_atomic(domain, iova, phys - iova_off, size, prot)) {
|
if (iommu_map(domain, iova, phys - iova_off, size, prot, GFP_ATOMIC)) {
|
||||||
iommu_dma_free_iova(cookie, iova, size, NULL);
|
iommu_dma_free_iova(cookie, iova, size, NULL);
|
||||||
return DMA_MAPPING_ERROR;
|
return DMA_MAPPING_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -2381,13 +2381,6 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(iommu_map);
|
EXPORT_SYMBOL_GPL(iommu_map);
|
||||||
|
|
||||||
int iommu_map_atomic(struct iommu_domain *domain, unsigned long iova,
|
|
||||||
phys_addr_t paddr, size_t size, int prot)
|
|
||||||
{
|
|
||||||
return iommu_map(domain, iova, paddr, size, prot, GFP_ATOMIC);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(iommu_map_atomic);
|
|
||||||
|
|
||||||
static size_t __iommu_unmap_pages(struct iommu_domain *domain,
|
static size_t __iommu_unmap_pages(struct iommu_domain *domain,
|
||||||
unsigned long iova, size_t size,
|
unsigned long iova, size_t size,
|
||||||
struct iommu_iotlb_gather *iotlb_gather)
|
struct iommu_iotlb_gather *iotlb_gather)
|
||||||
|
@ -468,8 +468,6 @@ extern struct iommu_domain *iommu_get_domain_for_dev(struct device *dev);
|
|||||||
extern struct iommu_domain *iommu_get_dma_domain(struct device *dev);
|
extern struct iommu_domain *iommu_get_dma_domain(struct device *dev);
|
||||||
extern int iommu_map(struct iommu_domain *domain, unsigned long iova,
|
extern int iommu_map(struct iommu_domain *domain, unsigned long iova,
|
||||||
phys_addr_t paddr, size_t size, int prot, gfp_t gfp);
|
phys_addr_t paddr, size_t size, int prot, gfp_t gfp);
|
||||||
extern int iommu_map_atomic(struct iommu_domain *domain, unsigned long iova,
|
|
||||||
phys_addr_t paddr, size_t size, int prot);
|
|
||||||
extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova,
|
extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova,
|
||||||
size_t size);
|
size_t size);
|
||||||
extern size_t iommu_unmap_fast(struct iommu_domain *domain,
|
extern size_t iommu_unmap_fast(struct iommu_domain *domain,
|
||||||
@ -778,13 +776,6 @@ static inline int iommu_map(struct iommu_domain *domain, unsigned long iova,
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int iommu_map_atomic(struct iommu_domain *domain,
|
|
||||||
unsigned long iova, phys_addr_t paddr,
|
|
||||||
size_t size, int prot)
|
|
||||||
{
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline size_t iommu_unmap(struct iommu_domain *domain,
|
static inline size_t iommu_unmap(struct iommu_domain *domain,
|
||||||
unsigned long iova, size_t size)
|
unsigned long iova, size_t size)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user