diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-06-25 08:46:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:00:55 -0400 |
commit | 68402ddc677005ed1b1359bbc1f279548cfc0928 (patch) | |
tree | 83da62a2b55e2ea7e0c46ed79c0d6498d36e1942 /drivers/sbus | |
parent | 9f1a3cfcffaed2fbb3206179295c79ca8289f5c3 (diff) |
[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 <clameter@sgi.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/flash.c | 1 | ||||
-rw-r--r-- | drivers/sbus/char/vfc_dev.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 5ae684c011f..31b8a5f6116 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -71,7 +71,6 @@ flash_mmap(struct file *file, struct vm_area_struct *vma) | |||
71 | if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size) | 71 | if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size) |
72 | size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)); | 72 | size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)); |
73 | 73 | ||
74 | vma->vm_flags |= (VM_SHM | VM_LOCKED); | ||
75 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 74 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
76 | 75 | ||
77 | if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) | 76 | if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) |
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index dfdd6be551f..ddcd330b9e8 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c | |||
@@ -623,7 +623,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma) | |||
623 | map_size = sizeof(struct vfc_regs); | 623 | map_size = sizeof(struct vfc_regs); |
624 | 624 | ||
625 | vma->vm_flags |= | 625 | vma->vm_flags |= |
626 | (VM_SHM | VM_LOCKED | VM_IO | VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE); | 626 | (VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE); |
627 | map_offset = (unsigned int) (long)dev->phys_regs; | 627 | map_offset = (unsigned int) (long)dev->phys_regs; |
628 | ret = io_remap_pfn_range(vma, vma->vm_start, | 628 | ret = io_remap_pfn_range(vma, vma->vm_start, |
629 | MK_IOSPACE_PFN(dev->which_io, | 629 | MK_IOSPACE_PFN(dev->which_io, |