mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] mm: remove VM_LOCKED before remap_pfn_range and drop VM_SHM
Remove VM_LOCKED before remap_pfn range from device drivers and get rid of VM_SHM. remap_pfn_range() already sets VM_IO. There is no need to set VM_SHM since it does nothing. VM_LOCKED is of no use since the remap_pfn_range does not place pages on the LRU. The pages are therefore never subject to swap anyways. Remove all the vm_flags settings before calling remap_pfn_range. After removing all the vm_flag settings no use of VM_SHM is left. Drop it. Signed-off-by: Christoph Lameter <[email protected]> Acked-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9f1a3cfcff
commit
68402ddc67
14 changed files with 1 additions and 32 deletions
|
|
@ -71,7 +71,6 @@ flash_mmap(struct file *file, struct vm_area_struct *vma)
|
|||
if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size)
|
||||
size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT));
|
||||
|
||||
vma->vm_flags |= (VM_SHM | VM_LOCKED);
|
||||
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||
|
||||
if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot))
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma)
|
|||
map_size = sizeof(struct vfc_regs);
|
||||
|
||||
vma->vm_flags |=
|
||||
(VM_SHM | VM_LOCKED | VM_IO | VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE);
|
||||
(VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE);
|
||||
map_offset = (unsigned int) (long)dev->phys_regs;
|
||||
ret = io_remap_pfn_range(vma, vma->vm_start,
|
||||
MK_IOSPACE_PFN(dev->which_io,
|
||||
|
|
|
|||
Loading…
Reference in a new issue