{
struct iommu_domain *domain = iommu_get_dma_domain(state->dev);
struct iommu_dma_cookie *cookie = domain->iova_cookie;
- struct iova_domain *iovad = &cookie->iovad;
- size_t iova_off = iova_offset(iovad, state->addr);
- struct iommu_iotlb_gather iotlb_gather;
- iommu_iotlb_gather_init(&iotlb_gather);
- __iommu_dma_free_iova(cookie, state->addr - iova_off,
- iova_align(iovad, state->size + iova_off),
- &iotlb_gather);
+ __iommu_dma_free_iova(cookie, state->addr, state->size, NULL);
}
int iommu_dma_start_range(struct device *dev)