[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b81c168-f5e0-f86a-f90e-22e8c3f2a602@arm.com>
Date: Fri, 31 May 2019 18:45:00 +0100
From: Robin Murphy <robin.murphy@....com>
To: Christoph Hellwig <hch@...radead.org>
Cc: David Miller <davem@...emloft.net>, madalin.bucur@....com,
netdev@...r.kernel.org, roy.pledge@....com,
linux-kernel@...r.kernel.org, leoyang.li@....com,
Joakim.Tjernlund@...inera.com, iommu@...ts.linux-foundation.org,
camelia.groza@....com, linuxppc-dev@...ts.ozlabs.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 0/6] Prerequisites for NXP LS104xA SMMU enablement
On 31/05/2019 18:08, Christoph Hellwig wrote:
> On Fri, May 31, 2019 at 06:03:30PM +0100, Robin Murphy wrote:
>>> 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.
>
> Well, we'll at least need DMA API wrappers that work on the dma addr
> only and hide this madness underneath. And then tell if an given device
> supports this and fail the probe otherwise.
Bleh, I'm certainly not keen on formalising any kind of
dma_to_phys()/dma_to_virt() interface for this. Or are you just
proposing something like dma_unmap_sorry_sir_the_dog_ate_my_homework()
for drivers which have 'lost' the original VA they mapped?
Robin.
Powered by blists - more mailing lists