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 ...@@ -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, static void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state) 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 /* 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 ...@@ -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; size = vma->vm_end - vma->vm_start;
/* To stop the swapper from even considering these pages. */ /* 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)) || if (((vma->vm_pgoff == 0) && (size == info->fix.smem_len)) ||
((off == info->fix.smem_len) && (size == PAGE_SIZE))) ((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 ...@@ -1891,8 +1891,6 @@ static int atyfb_mmap(struct fb_info *info, struct file *file, struct vm_area_st
if (!map_size) if (!map_size)
return -EINVAL; return -EINVAL;
vma->vm_flags |= VM_IO;
if (!par->mmaped) if (!par->mmaped)
par->mmaped = 1; par->mmaped = 1;
return 0; return 0;
......
...@@ -906,9 +906,8 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) ...@@ -906,9 +906,8 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
off += start; off += start;
vma->vm_pgoff = off >> PAGE_SHIFT; vma->vm_pgoff = off >> PAGE_SHIFT;
/* This is an IO map - tell maydump to skip this VMA */ /* 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__) #if defined(__sparc_v9__)
vma->vm_flags |= (VM_SHM | VM_LOCKED);
if (io_remap_page_range(vma, vma->vm_start, off, if (io_remap_page_range(vma, vma->vm_start, off,
vma->vm_end - vma->vm_start, vma->vm_page_prot, 0)) vma->vm_end - vma->vm_start, vma->vm_page_prot, 0))
return -EAGAIN; return -EAGAIN;
......
...@@ -52,7 +52,7 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, ...@@ -52,7 +52,7 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,
off = vma->vm_pgoff << PAGE_SHIFT; off = vma->vm_pgoff << PAGE_SHIFT;
/* To stop the swapper from even considering these pages */ /* 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 */ /* Each page, see which map applies */
for (page = 0; page < size; ){ 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