[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191015073104.GA32252@lst.de>
Date: Tue, 15 Oct 2019 09:31:04 +0200
From: Christoph Hellwig <hch@....de>
To: Robin Murphy <robin.murphy@....com>
Cc: David Gibson <david@...son.dropbear.id.au>,
Ram Pai <linuxram@...ibm.com>, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org, linuxppc-dev@...ts.ozlabs.org,
virtualization@...ts.linux-foundation.org,
benh@...nel.crashing.org, mpe@...erman.id.au, paulus@...abs.org,
mdroth@...ux.vnet.ibm.com, aik@...ux.ibm.com, paul.burton@...s.com,
b.zolnierkie@...sung.com, m.szyprowski@...sung.com, hch@....de,
jasowang@...hat.com, andmike@...ibm.com, sukadev@...ux.vnet.ibm.com
Subject: Re: [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()
On Mon, Oct 14, 2019 at 11:29:24AM +0100, Robin Murphy wrote:
>> However, I would like to see the commit message (and maybe the inline
>> comments) expanded a bit on what the distinction here is about. Some
>> of the text from the next patch would be suitable, about DMA addresses
>> usually being in a different address space but not in the case of
>> bounce buffering.
>
> Right, this needs a much tighter definition. "DMA address happens to be a
> valid physical address" is true of various IOMMU setups too, but I can't
> believe it's meaningful in such cases.
>
> If what you actually want is "DMA is direct or SWIOTLB" - i.e. "DMA address
> is physical address of DMA data (not necessarily the original buffer)" -
> wouldn't dma_is_direct() suffice?
It would. But drivers have absolutely no business knowing any of this.
Powered by blists - more mailing lists