Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1368344
| From | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/4] scatterlist: add sg_alloc_table_from_buf() helper |
| Date | 2016-03-31 16:20 +0200 |
| Message-ID | <riLC3-6ib-33@gated-at.bofh.it> (permalink) |
| References | <riK3g-531-23@gated-at.bofh.it> <riK3h-531-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Mar 31, 2016 at 02:29:42PM +0200, Boris Brezillon wrote: > sg_alloc_table_from_buf() provides an easy solution to create an sg_table > from a virtual address pointer. This function takes care of dealing with > vmallocated buffers, buffer alignment, or DMA engine limitations (maximum > DMA transfer size). Please note that the DMA API does not take account of coherency of memory regions other than non-high/lowmem - there are specific extensions to deal with this. What this means is that having an API that takes any virtual address pointer, converts it to a scatterlist which is then DMA mapped, is unsafe. It'll be okay for PIPT and non-aliasing VIPT cache architectures, but for other cache architectures this will hide this problem and make review harder. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/4] scatterlist: add sg_alloc_table_from_buf() helper Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-03-31 14:40 +0200
Re: [PATCH 2/4] scatterlist: add sg_alloc_table_from_buf() helper Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-03-31 16:20 +0200
Re: [PATCH 2/4] scatterlist: add sg_alloc_table_from_buf() helper Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-03-31 16:50 +0200
Re: [PATCH 2/4] scatterlist: add sg_alloc_table_from_buf() helper Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-03-31 17:20 +0200
csiph-web