The patch titled Subject: mm/frame-vec: drop gup_flags from get_vaddr_frames() has been removed from the -mm tree. Its filename was mm-frame-vec-drop-gup_flags-from-get_vaddr_frames.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Daniel Vetter <daniel.vetter@xxxxxxxx> Subject: mm/frame-vec: drop gup_flags from get_vaddr_frames() FOLL_WRITE | FOLL_FORCE is really the only reasonable thing to do for simple dma device that can't guarantee write protection. Which is also what all the callers are using. So just simplify this. Link: https://lkml.kernel.org/r/20201002175303.390363-1-daniel.vetter@xxxxxxxx Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> Acked-by: Tomasz Figa <tfiga@xxxxxxxxxxxx> [drivers/media/common/videobuf2/] Acked-by: Oded Gabbay <oded.gabbay@xxxxxxxxx> [drivers/misc/habanalabs] Cc: Inki Dae <inki.dae@xxxxxxxxxxx> Cc: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx> Cc: Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx> Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> Cc: Kukjin Kim <kgene@xxxxxxxxxx> Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx> Cc: Pawel Osciak <pawel@xxxxxxxxxx> Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Oded Gabbay <oded.gabbay@xxxxxxxxx> Cc: Omer Shpigelman <oshpigelman@xxxxxxxxx> Cc: Tomer Tayar <ttayar@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Pawel Piskorski <ppiskorski@xxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: Jason Gunthorpe <jgg@xxxxxxxx> Cc: Jérôme Glisse <jglisse@xxxxxxxxxx> Cc: John Hubbard <jhubbard@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 3 +-- drivers/media/common/videobuf2/videobuf2-memops.c | 3 +-- drivers/misc/habanalabs/common/memory.c | 3 +-- include/linux/mm.h | 2 +- mm/frame_vector.c | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c~mm-frame-vec-drop-gup_flags-from-get_vaddr_frames +++ a/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -480,8 +480,7 @@ static dma_addr_t *g2d_userptr_get_dma_a goto err_free; } - ret = get_vaddr_frames(start, npages, FOLL_FORCE | FOLL_WRITE, - g2d_userptr->vec); + ret = get_vaddr_frames(start, npages, g2d_userptr->vec); if (ret != npages) { DRM_DEV_ERROR(g2d->dev, "failed to get user pages from userptr.\n"); --- a/drivers/media/common/videobuf2/videobuf2-memops.c~mm-frame-vec-drop-gup_flags-from-get_vaddr_frames +++ a/drivers/media/common/videobuf2/videobuf2-memops.c @@ -40,7 +40,6 @@ struct frame_vector *vb2_create_framevec unsigned long first, last; unsigned long nr; struct frame_vector *vec; - unsigned int flags = FOLL_FORCE | FOLL_WRITE; first = start >> PAGE_SHIFT; last = (start + length - 1) >> PAGE_SHIFT; @@ -48,7 +47,7 @@ struct frame_vector *vb2_create_framevec vec = frame_vector_create(nr); if (!vec) return ERR_PTR(-ENOMEM); - ret = get_vaddr_frames(start & PAGE_MASK, nr, flags, vec); + ret = get_vaddr_frames(start & PAGE_MASK, nr, vec); if (ret < 0) goto out_destroy; /* We accept only complete set of PFNs */ --- a/drivers/misc/habanalabs/common/memory.c~mm-frame-vec-drop-gup_flags-from-get_vaddr_frames +++ a/drivers/misc/habanalabs/common/memory.c @@ -1287,8 +1287,7 @@ static int get_user_memory(struct hl_dev return -ENOMEM; } - rc = get_vaddr_frames(start, npages, FOLL_FORCE | FOLL_WRITE, - userptr->vec); + rc = get_vaddr_frames(start, npages, userptr->vec); if (rc != npages) { dev_err(hdev->dev, --- a/include/linux/mm.h~mm-frame-vec-drop-gup_flags-from-get_vaddr_frames +++ a/include/linux/mm.h @@ -1757,7 +1757,7 @@ struct frame_vector { struct frame_vector *frame_vector_create(unsigned int nr_frames); void frame_vector_destroy(struct frame_vector *vec); int get_vaddr_frames(unsigned long start, unsigned int nr_pfns, - unsigned int gup_flags, struct frame_vector *vec); + struct frame_vector *vec); void put_vaddr_frames(struct frame_vector *vec); int frame_vector_to_pages(struct frame_vector *vec); void frame_vector_to_pfns(struct frame_vector *vec); --- a/mm/frame_vector.c~mm-frame-vec-drop-gup_flags-from-get_vaddr_frames +++ a/mm/frame_vector.c @@ -12,7 +12,6 @@ * get_vaddr_frames() - map virtual addresses to pfns * @start: starting user address * @nr_frames: number of pages / pfns from start to map - * @gup_flags: flags modifying lookup behaviour * @vec: structure which receives pages / pfns of the addresses mapped. * It should have space for at least nr_frames entries. * @@ -32,10 +31,11 @@ * This function takes care of grabbing mmap_lock as necessary. */ int get_vaddr_frames(unsigned long start, unsigned int nr_frames, - unsigned int gup_flags, struct frame_vector *vec) + struct frame_vector *vec) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; + unsigned int gup_flags = FOLL_WRITE | FOLL_FORCE; int ret = 0; int err; int locked; _ Patches currently in -mm which might be from daniel.vetter@xxxxxxxx are mm-frame-vec-use-foll_longterm.patch