]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/dma: Respect bus DMA limit for IOVAs
authorRobin Murphy <robin.murphy@arm.com>
Mon, 23 Jul 2018 22:16:10 +0000 (23:16 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 27 Jul 2018 17:01:06 +0000 (19:01 +0200)
commit6eec66b56679d9bdc3a32f26c3879cbdceb6f2dd
tree25ae917520c023e69f0ccb71b71d56c20198592e
parent095845d1751de8ae88efc80787cbcc9f3402254f
iommu/dma: Respect bus DMA limit for IOVAs

Take the new bus limit into account (when present) for IOVA allocations,
to accommodate those SoCs which integrate off-the-shelf IP blocks with
narrower interconnects such that the link between a device output and an
IOMMU input can truncate DMA addresses to even fewer bits than the
native size of either block's interface would imply.

Eventually it might make sense for the DMA core to apply this constraint
up-front in dma_set_mask() and friends, but for now this seems like the
least risky approach.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/iommu/dma-iommu.c