Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1561064

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

From Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 00/26] IB: Optimize DMA mapping
Date 2017-01-17 23:30 +0100
Message-ID <t0Kql-4mk-5@gated-at.bofh.it> (permalink)
References (3 earlier) <sZhqp-5Q8-1@gated-at.bofh.it> <sZlX3-9H-5@gated-at.bofh.it> <sZlX3-9H-3@gated-at.bofh.it> <t0Kql-4mk-7@gated-at.bofh.it> <t0Kql-4mk-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 17, 2017 at 10:00:00PM +0000, Bart Van Assche wrote:
> +	/*
> +	 * 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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 00/26] IB: Optimize DMA mapping Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-17 23:30 +0100
  Re: [PATCH v2 00/26] IB: Optimize DMA mapping Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-01-18 01:30 +0100

csiph-web