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(). Vishal Moola (Oracle) (2): mm/vmalloc: Introduce vmap_file() drm: Use vmap_file() in shmem_pin_map() drivers/gpu/drm/i915/gt/shmem_utils.c | 23 +------ include/linux/vmalloc.h | 2 + mm/vmalloc.c | 97 +++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 20 deletions(-) -- 2.47.1