From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Message-Id: <20060301045952.12434.16351.sendpatchset@linux.site> In-Reply-To: <20060301045901.12434.54077.sendpatchset@linux.site> References: <20060301045901.12434.54077.sendpatchset@linux.site> Subject: [patch 5/5] drivers: leave vm_flags alone Date: Fri, 21 Apr 2006 08:44:00 +0200 (CEST) Sender: owner-linux-mm@kvack.org Return-Path: To: Andrew Morton Cc: Linux Kernel , Nick Piggin , Linux Memory Management List-ID: Get rid of some vm_flags twiddling from driver code. The net result of this + the last 4 patches is that all converted remap_vmalloc_range memory can support get_user_pages - do we want that? Can't hurt, can it? Signed-off-by: Nick Piggin Index: linux-2.6/drivers/media/video/em28xx/em28xx-video.c =================================================================== --- linux-2.6.orig/drivers/media/video/em28xx/em28xx-video.c +++ linux-2.6/drivers/media/video/em28xx/em28xx-video.c @@ -620,10 +620,6 @@ static int em28xx_v4l2_mmap(struct file return -EINVAL; } - /* VM_IO is eventually going to replace PageReserved altogether */ - vma->vm_flags |= VM_IO; - vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ - if (remap_vmalloc_range(vma, dev->frame[i].bufmem, 0)) { em28xx_videodbg("mmap: remap_vmalloc_range failed\n"); mutex_unlock(&dev->fileop_lock); Index: linux-2.6/drivers/media/video/et61x251/et61x251_core.c =================================================================== --- linux-2.6.orig/drivers/media/video/et61x251/et61x251_core.c +++ linux-2.6/drivers/media/video/et61x251/et61x251_core.c @@ -1499,9 +1499,6 @@ static int et61x251_mmap(struct file* fi return -EINVAL; } - vma->vm_flags |= VM_IO; - vma->vm_flags |= VM_RESERVED; - if (remap_vmalloc_range(vma, cam->frame[i].bufmem, 0)) { mutex_unlock(&cam->fileop_mutex); return -EAGAIN; Index: linux-2.6/drivers/media/video/meye.c =================================================================== --- linux-2.6.orig/drivers/media/video/meye.c +++ linux-2.6/drivers/media/video/meye.c @@ -1689,8 +1689,6 @@ static int meye_mmap(struct file *file, } vma->vm_ops = &meye_vm_ops; - vma->vm_flags &= ~VM_IO; /* not I/O memory */ - vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ vma->vm_private_data = (void *) (offset / gbufsize); meye_vm_open(vma); Index: linux-2.6/drivers/media/video/pwc/pwc-if.c =================================================================== --- linux-2.6.orig/drivers/media/video/pwc/pwc-if.c +++ linux-2.6/drivers/media/video/pwc/pwc-if.c @@ -1567,8 +1567,6 @@ static int pwc_video_mmap(struct file *f vma->vm_start, vma->vm_end - vma->vm_start); pdev = vdev->priv; - vma->vm_flags |= VM_IO; - if (remap_vmalloc_range(vma, pdev->image_data, 0)) return -EAGAIN; Index: linux-2.6/drivers/media/video/sn9c102/sn9c102_core.c =================================================================== --- linux-2.6.orig/drivers/media/video/sn9c102/sn9c102_core.c +++ linux-2.6/drivers/media/video/sn9c102/sn9c102_core.c @@ -1762,9 +1762,6 @@ static int sn9c102_mmap(struct file* fil return -EINVAL; } - vma->vm_flags |= VM_IO; - vma->vm_flags |= VM_RESERVED; - if (remap_vmalloc_range(vma, cam->frame[i].bufmem, 0)) { mutex_unlock(&cam->fileop_mutex); return -EAGAIN; Index: linux-2.6/drivers/media/video/zc0301/zc0301_core.c =================================================================== --- linux-2.6.orig/drivers/media/video/zc0301/zc0301_core.c +++ linux-2.6/drivers/media/video/zc0301/zc0301_core.c @@ -963,9 +963,6 @@ static int zc0301_mmap(struct file* filp return -EINVAL; } - vma->vm_flags |= VM_IO; - vma->vm_flags |= VM_RESERVED; - if (remap_vmalloc_range(vma, cam->frame[i].bufmem, 0)) { mutex_unlock(&cam->fileop_mutex); return -EAGAIN; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org