On Thu, 30 Jan 2025 16:18:04 -0800 "Vishal Moola (Oracle)" <vishal.moola@xxxxxxxxx> wrote: > Currently, users have to call vmap() or vmap_pfn() to map pages to > kernel virtual space. vmap() requires the page references, and > vmap_pfn() requires page pfns. If we have a file but no page references, > we have to do extra work to map them. > > Create a function, vmap_file(), to map a specified range of a given > file to kernel virtual space. Also convert a user that benefits from > vmap_file(). > Seems like a pretty specialized thing. Have you identified any other potential users of vmap_file()? I couldn't see any. If drm is likely to remain the only user of this, perhaps we should leave the code down in drivers/gpu/drm for now? Also, the amount of copy-n-pasting from vmap() into vmap_file() is undesirable - code size, maintenance overhead, etc.