Commit b29069a5 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Do not set VM_LOCKED on I/O mapped areas.

Use VM_RESERVED instead.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b9c1280
......@@ -725,7 +725,7 @@ static int __pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vm
static void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state)
{
vma->vm_flags |= (VM_SHM | VM_LOCKED);
vma->vm_flags |= (VM_IO | VM_RESERVED);
}
/* Set vm_page_prot of VMA, as appropriate for this architecture, for a pci
......
......@@ -1844,7 +1844,7 @@ static int atyfb_mmap(struct fb_info *info, struct file *file, struct vm_area_st
size = vma->vm_end - vma->vm_start;
/* To stop the swapper from even considering these pages. */
vma->vm_flags |= (VM_SHM | VM_LOCKED);
vma->vm_flags |= (VM_IO | VM_RESERVED);
if (((vma->vm_pgoff == 0) && (size == info->fix.smem_len)) ||
((off == info->fix.smem_len) && (size == PAGE_SIZE)))
......@@ -1891,8 +1891,6 @@ static int atyfb_mmap(struct fb_info *info, struct file *file, struct vm_area_st
if (!map_size)
return -EINVAL;
vma->vm_flags |= VM_IO;
if (!par->mmaped)
par->mmaped = 1;
return 0;
......
......@@ -906,9 +906,8 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
off += start;
vma->vm_pgoff = off >> PAGE_SHIFT;
/* This is an IO map - tell maydump to skip this VMA */
vma->vm_flags |= VM_IO;
vma->vm_flags |= VM_IO | VM_RESERVED;
#if defined(__sparc_v9__)
vma->vm_flags |= (VM_SHM | VM_LOCKED);
if (io_remap_page_range(vma, vma->vm_start, off,
vma->vm_end - vma->vm_start, vma->vm_page_prot, 0))
return -EAGAIN;
......
......@@ -52,7 +52,7 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,
off = vma->vm_pgoff << PAGE_SHIFT;
/* To stop the swapper from even considering these pages */
vma->vm_flags |= (VM_SHM | VM_IO | VM_LOCKED);
vma->vm_flags |= (VM_IO | VM_RESERVED);
/* Each page, see which map applies */
for (page = 0; page < size; ){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment