lkml.org 
[lkml]   [2019]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/21] dma-iommu: move the arm64 wrappers to common code
On Tue, Apr 09, 2019 at 04:07:02PM +0100, Robin Murphy wrote:
>> +static void iommu_dma_unmap_page(struct device *dev, dma_addr_t dma_handle,
>> + size_t size, enum dma_data_direction dir, unsigned long attrs)
>> +{
>> + if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC))
>> + iommu_dma_sync_single_for_cpu(dev, dma_handle, size, dir);
>> + __iommu_dma_unmap(iommu_get_domain_for_dev(dev), dma_handle, size);
>
> That wants to be iommu_get_dma_domain() there to minimise the overhead. In
> fact, I guess this could now be streamlined a bit in the style of
> iommu_dma_map_page() above - i.e. avoid doing a second domain lookup in the
> sync case - but that can happen later (if indeed you haven't already).

Yes, this should be iommu_get_dma_domain - this got lost during
a rebase to the kernel version that changed to the iommu_get_dma_domain
calls.

I don't think I've optimized to remove the additional call, but
I can easily throw in another patch to do that.

\
 
 \ /
  Last update: 2019-04-09 19:16    [W:0.061 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site