Re: [PATCH v3 0/6] Prerequisites for NXP LS104xA SMMU enablement

From: Robin Murphy
Date: Fri May 31 2019 - 13:07:21 EST


On 31/05/2019 17:33, Christoph Hellwig wrote:
On Thu, May 30, 2019 at 03:08:44PM -0700, David Miller wrote:
From: laurentiu.tudor@xxxxxxx
Date: Thu, 30 May 2019 17:19:45 +0300

Depends on this pull request:

http://lists.infradead.org/pipermail/linux-arm-kernel/2019-May/653554.html

I'm not sure how you want me to handle this.

The thing needs to be completely redone as it abuses parts of the
iommu API in a completely unacceptable way.

`git grep iommu_iova_to_phys drivers/{crypto,gpu,net}`

:(

I guess one alternative is for the offending drivers to maintain their own lookup tables of mapped DMA addresses - I think at least some of these things allow storing some kind of token in a descriptor, which even if it's not big enough for a virtual address might be sufficient for an index.

Robin.