On 24/03/2020 04:22, Christoph Hellwig wrote: > On Mon, Mar 23, 2020 at 09:07:38PM +0530, Aneesh Kumar K.V wrote: >> >> This is what I was trying, but considering I am new to DMA subsystem, I >> am not sure I got all the details correct. The idea is to look at the >> cpu addr and see if that can be used in direct map fashion(is >> bus_dma_limit the right restriction here?) if not fallback to dynamic >> IOMMU mapping. > > I don't think we can throw all these complications into the dma > mapping code. At some point I also wonder what the point is, > especially for scatterlist mappings, where the iommu can coalesce. This is for persistent memory which you can DMA to/from but yet it does not appear in the system as a normal memory and therefore requires special handling anyway (O_DIRECT or DAX, I do not know the exact mechanics). All other devices in the system should just run as usual, i.e. use 1:1 mapping if possible. -- Alexey
- generic DMA bypass flag v2 Christoph Hellwig
- [PATCH 1/2] dma-mapping: add a dma_ops_bypass fl... Christoph Hellwig
- Re: [PATCH 1/2] dma-mapping: add a dma_ops_b... Greg Kroah-Hartman
- Re: [PATCH 1/2] dma-mapping: add a dma_ops_b... Alexey Kardashevskiy
- Re: [PATCH 1/2] dma-mapping: add a dma_o... Christoph Hellwig
- Re: [PATCH 1/2] dma-mapping: add a d... Christoph Hellwig
- Re: [PATCH 1/2] dma-mapping: ad... Aneesh Kumar K.V
- Re: [PATCH 1/2] dma-mapping... Christoph Hellwig
- Re: [PATCH 1/2] dma-map... Alexey Kardashevskiy
- Re: [PATCH 1/2] dma-map... Aneesh Kumar K.V
- Re: [PATCH 1/2] dma-map... Christoph Hellwig
- Re: [PATCH 1/2] dma-map... Christoph Hellwig
- Re: [PATCH 1/2] dma-map... Alexey Kardashevskiy
- Re: [PATCH 1/2] dma-map... Christoph Hellwig
- Re: [PATCH 1/2] dma-map... Alexey Kardashevskiy
- Re: [PATCH 1/2] dma-map... Alexey Kardashevskiy
- Re: [PATCH 1/2] dma-map... Christoph Hellwig
- Re: [PATCH 1/2] dma-map... Alexey Kardashevskiy
- Re: [PATCH 1/2] dma-map... Christoph Hellwig