Thread (36 messages) 36 messages, 4 authors, 2020-09-26

Re: [PATCH 08/18] dma-mapping: add a new dma_alloc_noncoherent API

From: Robin Murphy <robin.murphy@arm.com>
Date: 2020-09-25 11:15:46
Also in: alsa-devel, linux-arm-kernel, linux-doc, linux-iommu, linux-media, linux-mips, linux-mm, linux-samsung-soc, linux-scsi, lkml, nouveau

On 2020-09-15 16:51, Christoph Hellwig wrote:
[...]
+These APIs allow to allocate pages in the kernel direct mapping that are
+guaranteed to be DMA addressable.  This means that unlike dma_alloc_coherent,
+virt_to_page can be called on the resulting address, and the resulting
Nit: if we explicitly describe this as if it's a guarantee that can be 
relied upon...
+struct page can be used for everything a struct page is suitable for.
[...]
+This routine allocates a region of <size> bytes of consistent memory.  It
+returns a pointer to the allocated region (in the processor's virtual address
+space) or NULL if the allocation failed.  The returned memory may or may not
+be in the kernels direct mapping.  Drivers must not call virt_to_page on
+the returned memory region.
...then forbid this document's target audience from relying on it, 
something seems off. At the very least it's unhelpfully unclear :/

Given patch #17, I suspect that the first paragraph is the one that's no 
longer true.

Robin.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help