Christoph Hellwig
2016-Dec-09 18:22 UTC
[PATCH 3/5] Move dma_ops from archdata into struct device
We'll need a bit of a wieder audience for this I think.. On Wed, Dec 07, 2016 at 05:11:28PM -0800, Bart Van Assche wrote:> Additionally, introduce set_dma_ops(). A later patch will introduce a > call to that function in the RDMA drivers that will be modified to use > dma_noop_ops.This looks good to me, and we had a lot of talk about this for other purposes for a while.
David Woodhouse
2016-Dec-09 19:13 UTC
[PATCH 3/5] Move dma_ops from archdata into struct device
On Fri, 2016-12-09 at 19:22 +0100, Christoph Hellwig wrote:> We'll need a bit of a wieder audience for this I think.. > > On Wed, Dec 07, 2016 at 05:11:28PM -0800, Bart Van Assche wrote: > > Additionally, introduce set_dma_ops(). A later patch will introduce a > > call to that function in the RDMA drivers that will be modified to use > > dma_noop_ops. > > This looks good to me, and we had a lot of talk about this for other > purposes for a while.Hm, I'm not convinced we want per-device dma_ops. What we want is per- device IOMMU ops, and any dma_ops are just a generic or platform- specific (in some cases) wrapper around those. We shouldn't normally need per-device DMA ops at all. -- dwmw2 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5760 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20161209/80488f4f/attachment-0001.bin>
Bart Van Assche
2016-Dec-09 19:46 UTC
[PATCH 3/5] Move dma_ops from archdata into struct device
On 12/09/2016 11:13 AM, David Woodhouse wrote:> On Fri, 2016-12-09 at 19:22 +0100, Christoph Hellwig wrote: >> We'll need a bit of a wieder audience for this I think.. >> >> On Wed, Dec 07, 2016 at 05:11:28PM -0800, Bart Van Assche wrote: >>> Additionally, introduce set_dma_ops(). A later patch will introduce a >>> call to that function in the RDMA drivers that will be modified to use >>> dma_noop_ops. >> >> This looks good to me, and we had a lot of talk about this for other >> purposes for a while. > > Hm, I'm not convinced we want per-device dma_ops. What we want is per- > device IOMMU ops, and any dma_ops are just a generic or platform- > specific (in some cases) wrapper around those. We shouldn't normally > need per-device DMA ops at all.Hello David, Can you recommend an approach for e.g. the qib driver (drivers/infiniband/hw/qib)? That driver uses the CPU (PIO) instead of DMA to transfer data to a PCIe device. Sorry but I don't see how per-device IOMMU ops would allow to avoid that e.g. a cache flush is triggered before PIO starts. Bart.