On Mon, Nov 16, 2015 at 03:22:06PM -0500, Alan Stern wrote:
> In other words, you're suggesting we do this:
> 
>       Check that userspace requested zerocopy (otherwise the user 
>       program might try to access other data stored in the same cache 
>       lines as the buffer while the I/O is in progres);
> 
>       Call get_user_pages (or get_user_pages_fast? -- it's not clear 
>       which should be used) for this buffer;
> 
>       Use the array of pages returned by that routine to populate
>       a scatter-gather list (sg_alloc_table_from_pages);
> 
>       Pass that list to dma_map_sg.
> 
> Is that right?

Yes.

> Does dma_map_sg check the page addresses against the DMA mask and
> automatically create a bounce buffer, or do we have to do that
> manually?  Documentation/DMA-API-HOWTO.txt doesn't discuss this.

You need to do this manually.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to