summaryrefslogtreecommitdiff
path: root/scripts/git-resolve.sh
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2025-04-15 12:35:59 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-25 15:53:19 +0200
commitfd1575e28a325b9b43fb4e182d1ee001b360f040 (patch)
treee4438daca25525eab85b7d59f313d097b9510238 /scripts/git-resolve.sh
parent5117f28a7d78d00a44d03463115a0f295dbbb1ff (diff)
comedi: allocate DMA coherent buffer as individual pages
Depending on the driver, the acquisition buffer is allocated either from normal memory, or from DMA coherent memory. For normal memory, the buffer is allocated as individual pages, but for DMA coherent memory, it is allocated as a single block. Prior to commit e36472145aa7 ("staging: comedi: use dma_mmap_coherent for DMA-able buffer mmap"), the buffer was allocated as individual pages for DMA coherent memory too, but that was changed to allocate it as a single block to allow `dma_mmap_coherent()` to be used to mmap it, because that requires the pages being mmap'ed to be contiguous. This patch allocates the buffer from DMA coherent memory a page at a time again, and works around the limitation of `dma_mmap_coherent()` by calling it in a loop for each page, with temporarily modified `vm_start` and `vm_end` values in the VMA. (The `vm_pgoff` value is 0.) Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20250415114008.5977-5-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/git-resolve.sh')
0 files changed, 0 insertions, 0 deletions