Re: [PATCH v2 00/26] IB: Optimize DMA mapping

From
Jason Gunthorpe <hidden>
Date
2017-01-17 22:27:57
Also in
lkml
Reply to
Bart Van Assche, 2017-01-17
On Tue, Jan 17, 2017 at 10:00:00PM +0000, Bart Van Assche wrote:
quoted hunk ↗ jump to hunk
+	/*
+	 * qib and hfi1 use two sets of DMA operations:
+	 * - The DMA operations of the PCIe device for SDMA.
+	 * - dma_virt_ops for users of the qib and hfi1 drivers.
+	 * The only purpose of @dma_device is to provide a struct device that
+	 * provides dma_virt_ops.
+	 */
+	struct device dma_device;
Creating a struct device, not calling device_initialize() and then
passing it around it other places is pretty ugly and potentially
dangerous.

Is there some other way?

Can you setup ibdev to be the 'dma device' for the user side?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thread (45 messages) 45 messages, 9 authors, last reply 2017-01-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help