summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2025-04-15 14:35:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-25 16:53:19 +0300
commitfd1575e28a325b9b43fb4e182d1ee001b360f040 (patch)
treee4438daca25525eab85b7d59f313d097b9510238 /tools/perf/scripts/python
parent5117f28a7d78d00a44d03463115a0f295dbbb1ff (diff)
downloadlinux-fd1575e28a325b9b43fb4e182d1ee001b360f040.tar.xz
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 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions