Revert "arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable"

This reverts commit cf3780155df66a2df28a0f894d524ea765385f08.

This is a preparation change for merging android-4.14 commit
acd501fffb7b51580e247c30402c81f07bcb03a3 into msm-4.14 branch.
The reverted delta is committed already via:

b136fd5965 arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable

Change-Id: I9d7e4427f5b09bbcc5e9cc95948b6863588d1865
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
This commit is contained in:
Blagovest Kolenichev 2019-07-10 07:55:19 -07:00
parent acd501fffb
commit f1775bcfb7

View File

@ -710,11 +710,6 @@ static int __iommu_mmap_attrs(struct device *dev, struct vm_area_struct *vma,
if (dma_mmap_from_dev_coherent(dev, vma, cpu_addr, size, &ret))
return ret;
if (!is_vmalloc_addr(cpu_addr)) {
unsigned long pfn = page_to_pfn(virt_to_page(cpu_addr));
return __swiotlb_mmap_pfn(vma, pfn, size);
}
if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) {
/*
* DMA_ATTR_FORCE_CONTIGUOUS allocations are always remapped,
@ -738,11 +733,6 @@ static int __iommu_get_sgtable(struct device *dev, struct sg_table *sgt,
unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT;
struct vm_struct *area = find_vm_area(cpu_addr);
if (!is_vmalloc_addr(cpu_addr)) {
struct page *page = virt_to_page(cpu_addr);
return __swiotlb_get_sgtable_page(sgt, page, size);
}
if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) {
/*
* DMA_ATTR_FORCE_CONTIGUOUS allocations are always remapped,