Re: [PATCH 09/21] dma-iommu: refactor iommu_dma_get_sgtable

2019-04-09 Thread Christoph Hellwig
On Tue, Apr 09, 2019 at 04:49:30PM +0100, Robin Murphy wrote: >> *cpu_addr, >> +size_t size) >> +{ >> +unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; >> +struct vm_struct *area = find_vm_area(cpu_addr); >> + >> +if (WARN_ON(!area || !area->pages)) >> +

Re: [PATCH 09/21] dma-iommu: refactor iommu_dma_get_sgtable

2019-04-09 Thread Robin Murphy
On 27/03/2019 08:04, Christoph Hellwig wrote: Move the vm_area handling into a new iommu_dma_get_sgtable_remap helper. Inline __iommu_dma_get_sgtable_page into the main function to simplify the code flow a bit. Signed-off-by: Christoph Hellwig --- drivers/iommu/dma-iommu.c | 54