]> git.ipfire.org Git - thirdparty/linux.git/commit
comedi: access buffer data page-by-page
authorIan Abbott <abbotti@mev.co.uk>
Tue, 15 Apr 2025 11:35:57 +0000 (12:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 13:53:18 +0000 (15:53 +0200)
commite7199b6b591eead7dc516a639a5b618f1e3cd207
tree7c41631f20e0a9077186d783b90ff1f7085dffad
parentcb0dde4d058b1fe7fc80d851b16c6687f461214b
comedi: access buffer data page-by-page

The aim is to get rid of the `prealloc_buf` member of `struct
comedi_async` and access the buffer contents on a page-by-page basis
using the addresses in the `virt_addr` member of `struct
comedi_buf_page`.  This will allow us to eliminate a `vmap()` that maps
the whole buffer.

Since the buffer pages have non-consecutive `virt_addr` addresses in
virtual memory (except for drivers using DMA), change the loops that
access buffer data to access it page-by-page.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20250415114008.5977-3-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/comedi/comedi_buf.c
drivers/comedi/comedi_fops.c