]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iommu/io-pgtable-arm: Allow appropriate DMA API use
authorRobin Murphy <Robin.Murphy@arm.com>
Wed, 29 Jul 2015 18:46:04 +0000 (19:46 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 6 Aug 2015 13:35:38 +0000 (14:35 +0100)
commitf8d5496131554f61b0fd931fa046f0233fe2aac2
treef7a7855797693f1a9c101cb4dc4dd234a54d5ce2
parent85430968ae72650a63f77f05a29d5c56e41581db
iommu/io-pgtable-arm: Allow appropriate DMA API use

Currently, users of the LPAE page table code are (ab)using dma_map_page()
as a means to flush page table updates for non-coherent IOMMUs. Since
from the CPU's point of view, creating IOMMU page tables *is* passing
DMA buffers to a device (the IOMMU's page table walker), there's little
reason not to use the DMA API correctly.

Allow IOMMU drivers to opt into DMA API operations for page table
allocation and updates by providing their appropriate device pointer.
The expectation is that an LPAE IOMMU should have a full view of system
memory, so use streaming mappings to avoid unnecessary pressure on
ZONE_DMA, and treat any DMA translation as a warning sign.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/Kconfig
drivers/iommu/io-pgtable-arm.c
drivers/iommu/io-pgtable.h