diff options
author | Konstantin Khlebnikov <khlebnikov@openvz.org> | 2012-10-08 19:29:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:22:19 -0400 |
commit | 314e51b9851b4f4e8ab302243ff5a6fc6147f379 (patch) | |
tree | f757b89206355fd129830782566768693eed23ce /drivers | |
parent | 0103bd16fb90bc741c7a03fd1ea4e8a505abad23 (diff) |
mm: kill vma flag VM_RESERVED and mm->reserved_vm counter
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
currently it lost original meaning but still has some effects:
| effect | alternative flags
-+------------------------+---------------------------------------------
1| account as reserved_vm | VM_IO
2| skip in core dump | VM_IO, VM_DONTDUMP
3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
This patch removes reserved_vm counter from mm_struct. Seems like nobody
cares about it, it does not exported into userspace directly, it only
reduces total_vm showed in proc.
Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.
remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.
[akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Venkatesh Pallipadi <venki@google.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
43 files changed, 44 insertions, 65 deletions
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index 0c7d340b9ab9..f74e892711dd 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c | |||
@@ -507,7 +507,7 @@ static int mbcs_gscr_mmap(struct file *fp, struct vm_area_struct *vma) | |||
507 | 507 | ||
508 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 508 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
509 | 509 | ||
510 | /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ | 510 | /* Remap-pfn-range will mark the range VM_IO */ |
511 | if (remap_pfn_range(vma, | 511 | if (remap_pfn_range(vma, |
512 | vma->vm_start, | 512 | vma->vm_start, |
513 | __pa(soft->gscr_addr) >> PAGE_SHIFT, | 513 | __pa(soft->gscr_addr) >> PAGE_SHIFT, |
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index e5eedfa24c91..0537903c985b 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -322,7 +322,7 @@ static int mmap_mem(struct file *file, struct vm_area_struct *vma) | |||
322 | 322 | ||
323 | vma->vm_ops = &mmap_mem_ops; | 323 | vma->vm_ops = &mmap_mem_ops; |
324 | 324 | ||
325 | /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ | 325 | /* Remap-pfn-range will mark the range VM_IO */ |
326 | if (remap_pfn_range(vma, | 326 | if (remap_pfn_range(vma, |
327 | vma->vm_start, | 327 | vma->vm_start, |
328 | vma->vm_pgoff, | 328 | vma->vm_pgoff, |
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c index 845f97fd1832..e1f60f968fdd 100644 --- a/drivers/char/mspec.c +++ b/drivers/char/mspec.c | |||
@@ -286,7 +286,7 @@ mspec_mmap(struct file *file, struct vm_area_struct *vma, | |||
286 | atomic_set(&vdata->refcnt, 1); | 286 | atomic_set(&vdata->refcnt, 1); |
287 | vma->vm_private_data = vdata; | 287 | vma->vm_private_data = vdata; |
288 | 288 | ||
289 | vma->vm_flags |= (VM_IO | VM_RESERVED | VM_PFNMAP | VM_DONTEXPAND); | 289 | vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP; |
290 | if (vdata->type == MSPEC_FETCHOP || vdata->type == MSPEC_UNCACHED) | 290 | if (vdata->type == MSPEC_FETCHOP || vdata->type == MSPEC_UNCACHED) |
291 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 291 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
292 | vma->vm_ops = &mspec_vm_ops; | 292 | vma->vm_ops = &mspec_vm_ops; |
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 92177d5aedee..24efae464e2c 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c | |||
@@ -706,7 +706,7 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) | |||
706 | goto out_unlock; | 706 | goto out_unlock; |
707 | } | 707 | } |
708 | 708 | ||
709 | vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND; | 709 | vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP; |
710 | vma->vm_ops = obj->dev->driver->gem_vm_ops; | 710 | vma->vm_ops = obj->dev->driver->gem_vm_ops; |
711 | vma->vm_private_data = map->handle; | 711 | vma->vm_private_data = map->handle; |
712 | vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); | 712 | vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); |
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 23a824e6a22a..db7bd292410b 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c | |||
@@ -514,8 +514,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) | |||
514 | 514 | ||
515 | vma->vm_ops = &drm_vm_dma_ops; | 515 | vma->vm_ops = &drm_vm_dma_ops; |
516 | 516 | ||
517 | vma->vm_flags |= VM_RESERVED; /* Don't swap */ | 517 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
518 | vma->vm_flags |= VM_DONTEXPAND; | ||
519 | 518 | ||
520 | drm_vm_open_locked(dev, vma); | 519 | drm_vm_open_locked(dev, vma); |
521 | return 0; | 520 | return 0; |
@@ -643,21 +642,16 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) | |||
643 | case _DRM_SHM: | 642 | case _DRM_SHM: |
644 | vma->vm_ops = &drm_vm_shm_ops; | 643 | vma->vm_ops = &drm_vm_shm_ops; |
645 | vma->vm_private_data = (void *)map; | 644 | vma->vm_private_data = (void *)map; |
646 | /* Don't let this area swap. Change when | ||
647 | DRM_KERNEL advisory is supported. */ | ||
648 | vma->vm_flags |= VM_RESERVED; | ||
649 | break; | 645 | break; |
650 | case _DRM_SCATTER_GATHER: | 646 | case _DRM_SCATTER_GATHER: |
651 | vma->vm_ops = &drm_vm_sg_ops; | 647 | vma->vm_ops = &drm_vm_sg_ops; |
652 | vma->vm_private_data = (void *)map; | 648 | vma->vm_private_data = (void *)map; |
653 | vma->vm_flags |= VM_RESERVED; | ||
654 | vma->vm_page_prot = drm_dma_prot(map->type, vma); | 649 | vma->vm_page_prot = drm_dma_prot(map->type, vma); |
655 | break; | 650 | break; |
656 | default: | 651 | default: |
657 | return -EINVAL; /* This should never happen. */ | 652 | return -EINVAL; /* This should never happen. */ |
658 | } | 653 | } |
659 | vma->vm_flags |= VM_RESERVED; /* Don't swap */ | 654 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
660 | vma->vm_flags |= VM_DONTEXPAND; | ||
661 | 655 | ||
662 | drm_vm_open_locked(dev, vma); | 656 | drm_vm_open_locked(dev, vma); |
663 | return 0; | 657 | return 0; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index fcdbe46914f7..d2545560664f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c | |||
@@ -500,7 +500,7 @@ static int exynos_drm_gem_mmap_buffer(struct file *filp, | |||
500 | 500 | ||
501 | DRM_DEBUG_KMS("%s\n", __FILE__); | 501 | DRM_DEBUG_KMS("%s\n", __FILE__); |
502 | 502 | ||
503 | vma->vm_flags |= (VM_IO | VM_RESERVED); | 503 | vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP; |
504 | 504 | ||
505 | update_vm_cache_attr(exynos_gem_obj, vma); | 505 | update_vm_cache_attr(exynos_gem_obj, vma); |
506 | 506 | ||
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 884ba73ac6ce..afded54dbb10 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c | |||
@@ -178,8 +178,7 @@ static int psbfb_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
178 | */ | 178 | */ |
179 | vma->vm_ops = &psbfb_vm_ops; | 179 | vma->vm_ops = &psbfb_vm_ops; |
180 | vma->vm_private_data = (void *)psbfb; | 180 | vma->vm_private_data = (void *)psbfb; |
181 | vma->vm_flags |= VM_RESERVED | VM_IO | | 181 | vma->vm_flags |= VM_IO | VM_MIXEDMAP | VM_DONTEXPAND | VM_DONTDUMP; |
182 | VM_MIXEDMAP | VM_DONTEXPAND; | ||
183 | return 0; | 182 | return 0; |
184 | } | 183 | } |
185 | 184 | ||
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index a877813571a4..3ba72dbdc4bd 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c | |||
@@ -285,7 +285,7 @@ int ttm_bo_mmap(struct file *filp, struct vm_area_struct *vma, | |||
285 | */ | 285 | */ |
286 | 286 | ||
287 | vma->vm_private_data = bo; | 287 | vma->vm_private_data = bo; |
288 | vma->vm_flags |= VM_RESERVED | VM_IO | VM_MIXEDMAP | VM_DONTEXPAND; | 288 | vma->vm_flags |= VM_IO | VM_MIXEDMAP | VM_DONTEXPAND | VM_DONTDUMP; |
289 | return 0; | 289 | return 0; |
290 | out_unref: | 290 | out_unref: |
291 | ttm_bo_unref(&bo); | 291 | ttm_bo_unref(&bo); |
@@ -300,7 +300,7 @@ int ttm_fbdev_mmap(struct vm_area_struct *vma, struct ttm_buffer_object *bo) | |||
300 | 300 | ||
301 | vma->vm_ops = &ttm_bo_vm_ops; | 301 | vma->vm_ops = &ttm_bo_vm_ops; |
302 | vma->vm_private_data = ttm_bo_reference(bo); | 302 | vma->vm_private_data = ttm_bo_reference(bo); |
303 | vma->vm_flags |= VM_RESERVED | VM_IO | VM_MIXEDMAP | VM_DONTEXPAND; | 303 | vma->vm_flags |= VM_IO | VM_MIXEDMAP | VM_DONTEXPAND; |
304 | return 0; | 304 | return 0; |
305 | } | 305 | } |
306 | EXPORT_SYMBOL(ttm_fbdev_mmap); | 306 | EXPORT_SYMBOL(ttm_fbdev_mmap); |
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c index 67df842fbb33..69a2b16f42a6 100644 --- a/drivers/gpu/drm/udl/udl_fb.c +++ b/drivers/gpu/drm/udl/udl_fb.c | |||
@@ -243,7 +243,7 @@ static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
243 | size = 0; | 243 | size = 0; |
244 | } | 244 | } |
245 | 245 | ||
246 | vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ | 246 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */ |
247 | return 0; | 247 | return 0; |
248 | } | 248 | } |
249 | 249 | ||
diff --git a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/ehca/ehca_uverbs.c index 45ee89b65c23..1a1d5d99fcf9 100644 --- a/drivers/infiniband/hw/ehca/ehca_uverbs.c +++ b/drivers/infiniband/hw/ehca/ehca_uverbs.c | |||
@@ -117,7 +117,7 @@ static int ehca_mmap_fw(struct vm_area_struct *vma, struct h_galpas *galpas, | |||
117 | physical = galpas->user.fw_handle; | 117 | physical = galpas->user.fw_handle; |
118 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 118 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
119 | ehca_gen_dbg("vsize=%llx physical=%llx", vsize, physical); | 119 | ehca_gen_dbg("vsize=%llx physical=%llx", vsize, physical); |
120 | /* VM_IO | VM_RESERVED are set by remap_pfn_range() */ | 120 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */ |
121 | ret = remap_4k_pfn(vma, vma->vm_start, physical >> EHCA_PAGESHIFT, | 121 | ret = remap_4k_pfn(vma, vma->vm_start, physical >> EHCA_PAGESHIFT, |
122 | vma->vm_page_prot); | 122 | vma->vm_page_prot); |
123 | if (unlikely(ret)) { | 123 | if (unlikely(ret)) { |
@@ -139,7 +139,7 @@ static int ehca_mmap_queue(struct vm_area_struct *vma, struct ipz_queue *queue, | |||
139 | u64 start, ofs; | 139 | u64 start, ofs; |
140 | struct page *page; | 140 | struct page *page; |
141 | 141 | ||
142 | vma->vm_flags |= VM_RESERVED; | 142 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
143 | start = vma->vm_start; | 143 | start = vma->vm_start; |
144 | for (ofs = 0; ofs < queue->queue_length; ofs += PAGE_SIZE) { | 144 | for (ofs = 0; ofs < queue->queue_length; ofs += PAGE_SIZE) { |
145 | u64 virt_addr = (u64)ipz_qeit_calc(queue, ofs); | 145 | u64 virt_addr = (u64)ipz_qeit_calc(queue, ofs); |
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index 736d9edbdbe7..3eb7e454849b 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -1225,7 +1225,7 @@ static int mmap_kvaddr(struct vm_area_struct *vma, u64 pgaddr, | |||
1225 | 1225 | ||
1226 | vma->vm_pgoff = (unsigned long) addr >> PAGE_SHIFT; | 1226 | vma->vm_pgoff = (unsigned long) addr >> PAGE_SHIFT; |
1227 | vma->vm_ops = &ipath_file_vm_ops; | 1227 | vma->vm_ops = &ipath_file_vm_ops; |
1228 | vma->vm_flags |= VM_RESERVED | VM_DONTEXPAND; | 1228 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
1229 | ret = 1; | 1229 | ret = 1; |
1230 | 1230 | ||
1231 | bail: | 1231 | bail: |
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c index faa44cb08071..959a5c4ff812 100644 --- a/drivers/infiniband/hw/qib/qib_file_ops.c +++ b/drivers/infiniband/hw/qib/qib_file_ops.c | |||
@@ -971,7 +971,7 @@ static int mmap_kvaddr(struct vm_area_struct *vma, u64 pgaddr, | |||
971 | 971 | ||
972 | vma->vm_pgoff = (unsigned long) addr >> PAGE_SHIFT; | 972 | vma->vm_pgoff = (unsigned long) addr >> PAGE_SHIFT; |
973 | vma->vm_ops = &qib_file_vm_ops; | 973 | vma->vm_ops = &qib_file_vm_ops; |
974 | vma->vm_flags |= VM_RESERVED | VM_DONTEXPAND; | 974 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
975 | ret = 1; | 975 | ret = 1; |
976 | 976 | ||
977 | bail: | 977 | bail: |
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c index 7bc775219f97..e5a76da86081 100644 --- a/drivers/media/pci/meye/meye.c +++ b/drivers/media/pci/meye/meye.c | |||
@@ -1647,7 +1647,7 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma) | |||
1647 | 1647 | ||
1648 | vma->vm_ops = &meye_vm_ops; | 1648 | vma->vm_ops = &meye_vm_ops; |
1649 | vma->vm_flags &= ~VM_IO; /* not I/O memory */ | 1649 | vma->vm_flags &= ~VM_IO; /* not I/O memory */ |
1650 | vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ | 1650 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
1651 | vma->vm_private_data = (void *) (offset / gbufsize); | 1651 | vma->vm_private_data = (void *) (offset / gbufsize); |
1652 | meye_vm_open(vma); | 1652 | meye_vm_open(vma); |
1653 | 1653 | ||
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 66ac21d466af..134016f0e660 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -911,7 +911,7 @@ static int omap_vout_mmap(struct file *file, struct vm_area_struct *vma) | |||
911 | 911 | ||
912 | q->bufs[i]->baddr = vma->vm_start; | 912 | q->bufs[i]->baddr = vma->vm_start; |
913 | 913 | ||
914 | vma->vm_flags |= VM_RESERVED; | 914 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
915 | vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | 915 | vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); |
916 | vma->vm_ops = &omap_vout_vm_ops; | 916 | vma->vm_ops = &omap_vout_vm_ops; |
917 | vma->vm_private_data = (void *) vout; | 917 | vma->vm_private_data = (void *) vout; |
diff --git a/drivers/media/platform/vino.c b/drivers/media/platform/vino.c index 790d96cffeea..70b0bf4b2900 100644 --- a/drivers/media/platform/vino.c +++ b/drivers/media/platform/vino.c | |||
@@ -3950,7 +3950,7 @@ found: | |||
3950 | 3950 | ||
3951 | fb->map_count = 1; | 3951 | fb->map_count = 1; |
3952 | 3952 | ||
3953 | vma->vm_flags |= VM_DONTEXPAND | VM_RESERVED; | 3953 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
3954 | vma->vm_flags &= ~VM_IO; | 3954 | vma->vm_flags &= ~VM_IO; |
3955 | vma->vm_private_data = fb; | 3955 | vma->vm_private_data = fb; |
3956 | vma->vm_file = file; | 3956 | vma->vm_file = file; |
diff --git a/drivers/media/usb/sn9c102/sn9c102_core.c b/drivers/media/usb/sn9c102/sn9c102_core.c index 19ea780b16ff..5bfc8e2f018f 100644 --- a/drivers/media/usb/sn9c102/sn9c102_core.c +++ b/drivers/media/usb/sn9c102/sn9c102_core.c | |||
@@ -2126,8 +2126,7 @@ static int sn9c102_mmap(struct file* filp, struct vm_area_struct *vma) | |||
2126 | return -EINVAL; | 2126 | return -EINVAL; |
2127 | } | 2127 | } |
2128 | 2128 | ||
2129 | vma->vm_flags |= VM_IO; | 2129 | vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP; |
2130 | vma->vm_flags |= VM_RESERVED; | ||
2131 | 2130 | ||
2132 | pos = cam->frame[i].bufmem; | 2131 | pos = cam->frame[i].bufmem; |
2133 | while (size > 0) { /* size is page-aligned */ | 2132 | while (size > 0) { /* size is page-aligned */ |
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index f67018ed3795..5c36a57e6590 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c | |||
@@ -1108,8 +1108,7 @@ static int usbvision_mmap(struct file *file, struct vm_area_struct *vma) | |||
1108 | } | 1108 | } |
1109 | 1109 | ||
1110 | /* VM_IO is eventually going to replace PageReserved altogether */ | 1110 | /* VM_IO is eventually going to replace PageReserved altogether */ |
1111 | vma->vm_flags |= VM_IO; | 1111 | vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP; |
1112 | vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ | ||
1113 | 1112 | ||
1114 | pos = usbvision->frame[i].data; | 1113 | pos = usbvision->frame[i].data; |
1115 | while (size > 0) { | 1114 | while (size > 0) { |
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c index f300deafd268..828e7c10bd70 100644 --- a/drivers/media/v4l2-core/videobuf-dma-sg.c +++ b/drivers/media/v4l2-core/videobuf-dma-sg.c | |||
@@ -582,7 +582,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q, | |||
582 | map->count = 1; | 582 | map->count = 1; |
583 | map->q = q; | 583 | map->q = q; |
584 | vma->vm_ops = &videobuf_vm_ops; | 584 | vma->vm_ops = &videobuf_vm_ops; |
585 | vma->vm_flags |= VM_DONTEXPAND | VM_RESERVED; | 585 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
586 | vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */ | 586 | vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */ |
587 | vma->vm_private_data = map; | 587 | vma->vm_private_data = map; |
588 | dprintk(1, "mmap %p: q=%p %08lx-%08lx pgoff %08lx bufs %d-%d\n", | 588 | dprintk(1, "mmap %p: q=%p %08lx-%08lx pgoff %08lx bufs %d-%d\n", |
diff --git a/drivers/media/v4l2-core/videobuf-vmalloc.c b/drivers/media/v4l2-core/videobuf-vmalloc.c index df142580e44c..2ff7fcc77b11 100644 --- a/drivers/media/v4l2-core/videobuf-vmalloc.c +++ b/drivers/media/v4l2-core/videobuf-vmalloc.c | |||
@@ -270,7 +270,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q, | |||
270 | } | 270 | } |
271 | 271 | ||
272 | vma->vm_ops = &videobuf_vm_ops; | 272 | vma->vm_ops = &videobuf_vm_ops; |
273 | vma->vm_flags |= VM_DONTEXPAND | VM_RESERVED; | 273 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
274 | vma->vm_private_data = map; | 274 | vma->vm_private_data = map; |
275 | 275 | ||
276 | dprintk(1, "mmap %p: q=%p %08lx-%08lx (%lx) pgoff %08lx buf %d\n", | 276 | dprintk(1, "mmap %p: q=%p %08lx-%08lx (%lx) pgoff %08lx buf %d\n", |
diff --git a/drivers/media/v4l2-core/videobuf2-memops.c b/drivers/media/v4l2-core/videobuf2-memops.c index 504cd4cbe29e..051ea3571b20 100644 --- a/drivers/media/v4l2-core/videobuf2-memops.c +++ b/drivers/media/v4l2-core/videobuf2-memops.c | |||
@@ -163,7 +163,7 @@ int vb2_mmap_pfn_range(struct vm_area_struct *vma, unsigned long paddr, | |||
163 | return ret; | 163 | return ret; |
164 | } | 164 | } |
165 | 165 | ||
166 | vma->vm_flags |= VM_DONTEXPAND | VM_RESERVED; | 166 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
167 | vma->vm_private_data = priv; | 167 | vma->vm_private_data = priv; |
168 | vma->vm_ops = vm_ops; | 168 | vma->vm_ops = vm_ops; |
169 | 169 | ||
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c index 0c43297ed9ac..8835eabb3b87 100644 --- a/drivers/misc/carma/carma-fpga.c +++ b/drivers/misc/carma/carma-fpga.c | |||
@@ -1243,8 +1243,6 @@ static int data_mmap(struct file *filp, struct vm_area_struct *vma) | |||
1243 | return -EINVAL; | 1243 | return -EINVAL; |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | /* IO memory (stop cacheing) */ | ||
1247 | vma->vm_flags |= VM_IO | VM_RESERVED; | ||
1248 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 1246 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
1249 | 1247 | ||
1250 | return io_remap_pfn_range(vma, vma->vm_start, addr, vsize, | 1248 | return io_remap_pfn_range(vma, vma->vm_start, addr, vsize, |
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index ecafa4ba238b..492c8cac69ac 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c | |||
@@ -108,9 +108,8 @@ static int gru_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
108 | vma->vm_end & (GRU_GSEG_PAGESIZE - 1)) | 108 | vma->vm_end & (GRU_GSEG_PAGESIZE - 1)) |
109 | return -EINVAL; | 109 | return -EINVAL; |
110 | 110 | ||
111 | vma->vm_flags |= | 111 | vma->vm_flags |= VM_IO | VM_PFNMAP | VM_LOCKED | |
112 | (VM_IO | VM_DONTCOPY | VM_LOCKED | VM_DONTEXPAND | VM_PFNMAP | | 112 | VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP; |
113 | VM_RESERVED); | ||
114 | vma->vm_page_prot = PAGE_SHARED; | 113 | vma->vm_page_prot = PAGE_SHARED; |
115 | vma->vm_ops = &gru_vm_ops; | 114 | vma->vm_ops = &gru_vm_ops; |
116 | 115 | ||
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index a6e74514e662..73ae81a629f2 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -1182,7 +1182,7 @@ static int mtdchar_mmap(struct file *file, struct vm_area_struct *vma) | |||
1182 | return -EINVAL; | 1182 | return -EINVAL; |
1183 | if (set_vm_offset(vma, off) < 0) | 1183 | if (set_vm_offset(vma, off) < 0) |
1184 | return -EINVAL; | 1184 | return -EINVAL; |
1185 | vma->vm_flags |= VM_IO | VM_RESERVED; | 1185 | vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP; |
1186 | 1186 | ||
1187 | #ifdef pgprot_noncached | 1187 | #ifdef pgprot_noncached |
1188 | if (file->f_flags & O_DSYNC || off >= __pa(high_memory)) | 1188 | if (file->f_flags & O_DSYNC || off >= __pa(high_memory)) |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 9c5c5f2b3962..be2c9a6561ff 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1257,7 +1257,7 @@ sg_mmap(struct file *filp, struct vm_area_struct *vma) | |||
1257 | } | 1257 | } |
1258 | 1258 | ||
1259 | sfp->mmap_called = 1; | 1259 | sfp->mmap_called = 1; |
1260 | vma->vm_flags |= VM_RESERVED; | 1260 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
1261 | vma->vm_private_data = sfp; | 1261 | vma->vm_private_data = sfp; |
1262 | vma->vm_ops = &sg_mmap_vm_ops; | 1262 | vma->vm_ops = &sg_mmap_vm_ops; |
1263 | return 0; | 1263 | return 0; |
diff --git a/drivers/staging/omapdrm/omap_gem_dmabuf.c b/drivers/staging/omapdrm/omap_gem_dmabuf.c index 42728e0cc194..c6f3ef6f57b9 100644 --- a/drivers/staging/omapdrm/omap_gem_dmabuf.c +++ b/drivers/staging/omapdrm/omap_gem_dmabuf.c | |||
@@ -160,7 +160,7 @@ static int omap_gem_dmabuf_mmap(struct dma_buf *buffer, | |||
160 | goto out_unlock; | 160 | goto out_unlock; |
161 | } | 161 | } |
162 | 162 | ||
163 | vma->vm_flags |= VM_RESERVED | VM_IO | VM_PFNMAP | VM_DONTEXPAND; | 163 | vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP; |
164 | vma->vm_ops = obj->dev->driver->gem_vm_ops; | 164 | vma->vm_ops = obj->dev->driver->gem_vm_ops; |
165 | vma->vm_private_data = obj; | 165 | vma->vm_private_data = obj; |
166 | vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); | 166 | vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); |
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c index bddea1d3b2c3..701a11ac676d 100644 --- a/drivers/staging/tidspbridge/rmgr/drv_interface.c +++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c | |||
@@ -261,7 +261,7 @@ static int bridge_mmap(struct file *filp, struct vm_area_struct *vma) | |||
261 | { | 261 | { |
262 | u32 status; | 262 | u32 status; |
263 | 263 | ||
264 | vma->vm_flags |= VM_RESERVED | VM_IO; | 264 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */ |
265 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 265 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
266 | 266 | ||
267 | dev_dbg(bridge, "%s: vm filp %p start %lx end %lx page_prot %ulx " | 267 | dev_dbg(bridge, "%s: vm filp %p start %lx end %lx page_prot %ulx " |
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index a783d533a1a6..5110f367f1f1 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -653,8 +653,6 @@ static int uio_mmap_physical(struct vm_area_struct *vma) | |||
653 | if (mi < 0) | 653 | if (mi < 0) |
654 | return -EINVAL; | 654 | return -EINVAL; |
655 | 655 | ||
656 | vma->vm_flags |= VM_IO | VM_RESERVED; | ||
657 | |||
658 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 656 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
659 | 657 | ||
660 | return remap_pfn_range(vma, | 658 | return remap_pfn_range(vma, |
@@ -666,7 +664,7 @@ static int uio_mmap_physical(struct vm_area_struct *vma) | |||
666 | 664 | ||
667 | static int uio_mmap_logical(struct vm_area_struct *vma) | 665 | static int uio_mmap_logical(struct vm_area_struct *vma) |
668 | { | 666 | { |
669 | vma->vm_flags |= VM_RESERVED; | 667 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
670 | vma->vm_ops = &uio_vm_ops; | 668 | vma->vm_ops = &uio_vm_ops; |
671 | uio_vma_open(vma); | 669 | uio_vma_open(vma); |
672 | return 0; | 670 | return 0; |
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 91cd85076a44..9a62e89d6dc0 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c | |||
@@ -1247,7 +1247,7 @@ static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) | |||
1247 | { | 1247 | { |
1248 | /* don't do anything here: "fault" will set up page table entries */ | 1248 | /* don't do anything here: "fault" will set up page table entries */ |
1249 | vma->vm_ops = &mon_bin_vm_ops; | 1249 | vma->vm_ops = &mon_bin_vm_ops; |
1250 | vma->vm_flags |= VM_RESERVED; | 1250 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
1251 | vma->vm_private_data = filp->private_data; | 1251 | vma->vm_private_data = filp->private_data; |
1252 | mon_bin_vma_open(vma); | 1252 | mon_bin_vma_open(vma); |
1253 | return 0; | 1253 | return 0; |
diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c index a425d65d5ba2..fa44fbed397d 100644 --- a/drivers/video/68328fb.c +++ b/drivers/video/68328fb.c | |||
@@ -400,7 +400,7 @@ static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
400 | #ifndef MMU | 400 | #ifndef MMU |
401 | /* this is uClinux (no MMU) specific code */ | 401 | /* this is uClinux (no MMU) specific code */ |
402 | 402 | ||
403 | vma->vm_flags |= VM_RESERVED; | 403 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
404 | vma->vm_start = videomemory; | 404 | vma->vm_start = videomemory; |
405 | 405 | ||
406 | return 0; | 406 | return 0; |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 3f2e8c13f1ca..868932f904ef 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -1942,8 +1942,7 @@ static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
1942 | off = vma->vm_pgoff << PAGE_SHIFT; | 1942 | off = vma->vm_pgoff << PAGE_SHIFT; |
1943 | size = vma->vm_end - vma->vm_start; | 1943 | size = vma->vm_end - vma->vm_start; |
1944 | 1944 | ||
1945 | /* To stop the swapper from even considering these pages. */ | 1945 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */ |
1946 | vma->vm_flags |= (VM_IO | VM_RESERVED); | ||
1947 | 1946 | ||
1948 | if (((vma->vm_pgoff == 0) && (size == info->fix.smem_len)) || | 1947 | if (((vma->vm_pgoff == 0) && (size == info->fix.smem_len)) || |
1949 | ((off == info->fix.smem_len) && (size == PAGE_SIZE))) | 1948 | ((off == info->fix.smem_len) && (size == PAGE_SIZE))) |
diff --git a/drivers/video/fb-puv3.c b/drivers/video/fb-puv3.c index 60a787fa32cf..7d106f1f4906 100644 --- a/drivers/video/fb-puv3.c +++ b/drivers/video/fb-puv3.c | |||
@@ -653,9 +653,8 @@ int unifb_mmap(struct fb_info *info, | |||
653 | vma->vm_page_prot)) | 653 | vma->vm_page_prot)) |
654 | return -EAGAIN; | 654 | return -EAGAIN; |
655 | 655 | ||
656 | vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ | 656 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */ |
657 | return 0; | 657 | return 0; |
658 | |||
659 | } | 658 | } |
660 | 659 | ||
661 | static struct fb_ops unifb_ops = { | 660 | static struct fb_ops unifb_ops = { |
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c index 64cda560c488..88cad6b8b479 100644 --- a/drivers/video/fb_defio.c +++ b/drivers/video/fb_defio.c | |||
@@ -166,7 +166,7 @@ static const struct address_space_operations fb_deferred_io_aops = { | |||
166 | static int fb_deferred_io_mmap(struct fb_info *info, struct vm_area_struct *vma) | 166 | static int fb_deferred_io_mmap(struct fb_info *info, struct vm_area_struct *vma) |
167 | { | 167 | { |
168 | vma->vm_ops = &fb_deferred_io_vm_ops; | 168 | vma->vm_ops = &fb_deferred_io_vm_ops; |
169 | vma->vm_flags |= ( VM_RESERVED | VM_DONTEXPAND ); | 169 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
170 | if (!(info->flags & FBINFO_VIRTFB)) | 170 | if (!(info->flags & FBINFO_VIRTFB)) |
171 | vma->vm_flags |= VM_IO; | 171 | vma->vm_flags |= VM_IO; |
172 | vma->vm_private_data = info; | 172 | vma->vm_private_data = info; |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 0dff12a1daef..3ff0105a496a 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1410,8 +1410,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) | |||
1410 | return -EINVAL; | 1410 | return -EINVAL; |
1411 | off += start; | 1411 | off += start; |
1412 | vma->vm_pgoff = off >> PAGE_SHIFT; | 1412 | vma->vm_pgoff = off >> PAGE_SHIFT; |
1413 | /* This is an IO map - tell maydump to skip this VMA */ | 1413 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by io_remap_pfn_range()*/ |
1414 | vma->vm_flags |= VM_IO | VM_RESERVED; | ||
1415 | vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); | 1414 | vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); |
1416 | fb_pgprotect(file, vma, off); | 1415 | fb_pgprotect(file, vma, off); |
1417 | if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, | 1416 | if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, |
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index 7e7b7a9ba274..05e2a8a99d8f 100644 --- a/drivers/video/gbefb.c +++ b/drivers/video/gbefb.c | |||
@@ -1024,7 +1024,7 @@ static int gbefb_mmap(struct fb_info *info, | |||
1024 | pgprot_val(vma->vm_page_prot) = | 1024 | pgprot_val(vma->vm_page_prot) = |
1025 | pgprot_fb(pgprot_val(vma->vm_page_prot)); | 1025 | pgprot_fb(pgprot_val(vma->vm_page_prot)); |
1026 | 1026 | ||
1027 | vma->vm_flags |= VM_IO | VM_RESERVED; | 1027 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */ |
1028 | 1028 | ||
1029 | /* look for the starting tile */ | 1029 | /* look for the starting tile */ |
1030 | tile = &gbe_tiles.cpu[offset >> TILE_SHIFT]; | 1030 | tile = &gbe_tiles.cpu[offset >> TILE_SHIFT]; |
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 3c39aa8de928..15373f4aee19 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -1128,7 +1128,7 @@ static int omapfb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) | |||
1128 | DBG("user mmap region start %lx, len %d, off %lx\n", start, len, off); | 1128 | DBG("user mmap region start %lx, len %d, off %lx\n", start, len, off); |
1129 | 1129 | ||
1130 | vma->vm_pgoff = off >> PAGE_SHIFT; | 1130 | vma->vm_pgoff = off >> PAGE_SHIFT; |
1131 | vma->vm_flags |= VM_IO | VM_RESERVED; | 1131 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */ |
1132 | vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | 1132 | vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); |
1133 | vma->vm_ops = &mmap_user_ops; | 1133 | vma->vm_ops = &mmap_user_ops; |
1134 | vma->vm_private_data = rg; | 1134 | vma->vm_private_data = rg; |
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 3c1de981a18c..296afae442f4 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c | |||
@@ -57,9 +57,8 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, | |||
57 | 57 | ||
58 | off = vma->vm_pgoff << PAGE_SHIFT; | 58 | off = vma->vm_pgoff << PAGE_SHIFT; |
59 | 59 | ||
60 | /* To stop the swapper from even considering these pages */ | 60 | /* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */ |
61 | vma->vm_flags |= (VM_IO | VM_RESERVED); | 61 | |
62 | |||
63 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 62 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
64 | 63 | ||
65 | /* Each page, see which map applies */ | 64 | /* Each page, see which map applies */ |
diff --git a/drivers/video/smscufx.c b/drivers/video/smscufx.c index 5533a32c6ca1..97bd6620c364 100644 --- a/drivers/video/smscufx.c +++ b/drivers/video/smscufx.c | |||
@@ -803,7 +803,6 @@ static int ufx_ops_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
803 | size = 0; | 803 | size = 0; |
804 | } | 804 | } |
805 | 805 | ||
806 | vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ | ||
807 | return 0; | 806 | return 0; |
808 | } | 807 | } |
809 | 808 | ||
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 8af64148294b..f45eba3d6150 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c | |||
@@ -345,7 +345,6 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
345 | size = 0; | 345 | size = 0; |
346 | } | 346 | } |
347 | 347 | ||
348 | vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ | ||
349 | return 0; | 348 | return 0; |
350 | } | 349 | } |
351 | 350 | ||
diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c index 970e43d13f52..89aef343e295 100644 --- a/drivers/video/vermilion/vermilion.c +++ b/drivers/video/vermilion/vermilion.c | |||
@@ -1018,7 +1018,6 @@ static int vmlfb_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
1018 | offset += vinfo->vram_start; | 1018 | offset += vinfo->vram_start; |
1019 | pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; | 1019 | pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; |
1020 | pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT; | 1020 | pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT; |
1021 | vma->vm_flags |= VM_RESERVED | VM_IO; | ||
1022 | if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT, | 1021 | if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT, |
1023 | size, vma->vm_page_prot)) | 1022 | size, vma->vm_page_prot)) |
1024 | return -EAGAIN; | 1023 | return -EAGAIN; |
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c index 501a922aa9dc..c7f692525b88 100644 --- a/drivers/video/vfb.c +++ b/drivers/video/vfb.c | |||
@@ -439,7 +439,6 @@ static int vfb_mmap(struct fb_info *info, | |||
439 | size = 0; | 439 | size = 0; |
440 | } | 440 | } |
441 | 441 | ||
442 | vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */ | ||
443 | return 0; | 442 | return 0; |
444 | 443 | ||
445 | } | 444 | } |
diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c index 934985d14c24..4097987b330e 100644 --- a/drivers/xen/gntalloc.c +++ b/drivers/xen/gntalloc.c | |||
@@ -535,7 +535,7 @@ static int gntalloc_mmap(struct file *filp, struct vm_area_struct *vma) | |||
535 | 535 | ||
536 | vma->vm_private_data = vm_priv; | 536 | vma->vm_private_data = vm_priv; |
537 | 537 | ||
538 | vma->vm_flags |= VM_RESERVED | VM_DONTEXPAND; | 538 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
539 | 539 | ||
540 | vma->vm_ops = &gntalloc_vmops; | 540 | vma->vm_ops = &gntalloc_vmops; |
541 | 541 | ||
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 5df9fd847b2e..610bfc6be177 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c | |||
@@ -720,7 +720,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) | |||
720 | 720 | ||
721 | vma->vm_ops = &gntdev_vmops; | 721 | vma->vm_ops = &gntdev_vmops; |
722 | 722 | ||
723 | vma->vm_flags |= VM_RESERVED|VM_DONTEXPAND; | 723 | vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; |
724 | 724 | ||
725 | if (use_ptemod) | 725 | if (use_ptemod) |
726 | vma->vm_flags |= VM_DONTCOPY; | 726 | vma->vm_flags |= VM_DONTCOPY; |
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index ef6389580b8c..8adb9cc267f9 100644 --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c | |||
@@ -455,7 +455,8 @@ static int privcmd_mmap(struct file *file, struct vm_area_struct *vma) | |||
455 | { | 455 | { |
456 | /* DONTCOPY is essential for Xen because copy_page_range doesn't know | 456 | /* DONTCOPY is essential for Xen because copy_page_range doesn't know |
457 | * how to recreate these mappings */ | 457 | * how to recreate these mappings */ |
458 | vma->vm_flags |= VM_RESERVED | VM_IO | VM_DONTCOPY | VM_PFNMAP; | 458 | vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTCOPY | |
459 | VM_DONTEXPAND | VM_DONTDUMP; | ||
459 | vma->vm_ops = &privcmd_vm_ops; | 460 | vma->vm_ops = &privcmd_vm_ops; |
460 | vma->vm_private_data = NULL; | 461 | vma->vm_private_data = NULL; |
461 | 462 | ||