Merge "arm: dma-mapping: handle IOVA address zero"
This commit is contained in:
commit
ecef458e0d
2 changed files with 0 additions and 21 deletions
|
@ -1931,9 +1931,6 @@ static void arm_coherent_iommu_unmap_page(struct device *dev, dma_addr_t handle,
|
|||
int offset = handle & ~PAGE_MASK;
|
||||
int len = PAGE_ALIGN(size + offset);
|
||||
|
||||
if (!iova)
|
||||
return;
|
||||
|
||||
iommu_unmap(mapping->domain, iova, len);
|
||||
__free_iova(mapping, iova, len);
|
||||
}
|
||||
|
@ -1957,9 +1954,6 @@ static void arm_iommu_unmap_page(struct device *dev, dma_addr_t handle,
|
|||
int offset = handle & ~PAGE_MASK;
|
||||
int len = PAGE_ALIGN(size + offset);
|
||||
|
||||
if (!iova)
|
||||
return;
|
||||
|
||||
if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs))
|
||||
__dma_page_dev_to_cpu(page, offset, size, dir);
|
||||
|
||||
|
@ -1975,9 +1969,6 @@ static void arm_iommu_sync_single_for_cpu(struct device *dev,
|
|||
struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova));
|
||||
unsigned int offset = handle & ~PAGE_MASK;
|
||||
|
||||
if (!iova)
|
||||
return;
|
||||
|
||||
__dma_page_dev_to_cpu(page, offset, size, dir);
|
||||
}
|
||||
|
||||
|
@ -1989,9 +1980,6 @@ static void arm_iommu_sync_single_for_device(struct device *dev,
|
|||
struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova));
|
||||
unsigned int offset = handle & ~PAGE_MASK;
|
||||
|
||||
if (!iova)
|
||||
return;
|
||||
|
||||
__dma_page_cpu_to_dev(page, offset, size, dir);
|
||||
}
|
||||
|
||||
|
|
|
@ -1796,9 +1796,6 @@ static void arm_iommu_unmap_page(struct device *dev, dma_addr_t handle,
|
|||
int offset = handle & ~PAGE_MASK;
|
||||
int len = PAGE_ALIGN(size + offset);
|
||||
|
||||
if (!iova)
|
||||
return;
|
||||
|
||||
if (!(is_device_dma_coherent(dev) ||
|
||||
dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)))
|
||||
__dma_page_dev_to_cpu(page, offset, size, dir);
|
||||
|
@ -1816,9 +1813,6 @@ static void arm_iommu_sync_single_for_cpu(struct device *dev,
|
|||
mapping->domain, iova));
|
||||
unsigned int offset = handle & ~PAGE_MASK;
|
||||
|
||||
if (!iova)
|
||||
return;
|
||||
|
||||
if (!is_device_dma_coherent(dev))
|
||||
__dma_page_dev_to_cpu(page, offset, size, dir);
|
||||
}
|
||||
|
@ -1832,9 +1826,6 @@ static void arm_iommu_sync_single_for_device(struct device *dev,
|
|||
mapping->domain, iova));
|
||||
unsigned int offset = handle & ~PAGE_MASK;
|
||||
|
||||
if (!iova)
|
||||
return;
|
||||
|
||||
if (!is_device_dma_coherent(dev))
|
||||
__dma_page_cpu_to_dev(page, offset, size, dir);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue