*参照元 [#t4ebd230] #backlinks *説明 [#rbf97d35] -パス: [[linux-4.4.1/drivers/iommu/dma-iommu.c]] -FIXME: これは何? --説明 **引数 [#p942ddc4] -struct iommu_domain *domain -- --[[linux-4.4.1/iommu_domain]] -dma_addr_t dma_addr -- --[[linux-4.4.1/dma_addr_t]] **返り値 [#q6cec660] -なし **参考 [#hf692065] *実装 [#g8af5a6e] /* The IOVA allocator knows what we mapped, so just unmap whatever that was */ static void __iommu_dma_unmap(struct iommu_domain *domain, dma_addr_t dma_addr) { struct iova_domain *iovad = domain->iova_cookie; unsigned long shift = iova_shift(iovad); unsigned long pfn = dma_addr >> shift; struct iova *iova = find_iova(iovad, pfn); size_t size; - --[[linux-4.4.1/iova_domain]] --[[linux-4.4.1/iova_shift()]] --[[linux-4.4.1/iova]] --[[linux-4.4.1/find_iova()]] if (WARN_ON(!iova)) return; - --[[linux-4.4.1/WARN_ON()]] size = iova_size(iova) << shift; size -= iommu_unmap(domain, pfn << shift, size); - --[[linux-4.4.1/iova_size()]] --[[linux-4.4.1/iommu_unmap()]] /* ...and if we can't, then something is horribly, horribly wrong */ WARN_ON(size > 0); __free_iova(iovad, iova); - --[[linux-4.4.1/__free_iova()]] } *コメント [#m1c2678e]