• Robin Murphy's avatar
    iommu/io-pgtable-arm: Allow appropriate DMA API use · f8d54961
    Robin Murphy authored
    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: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    f8d54961
Kconfig 10.5 KB