From 14778d9072e53d2171f66ffd9657daff41acfaed Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 21 Mar 2006 02:29:39 -0800 Subject: [SPARC]: Respect vm_page_prot in io_remap_page_range(). Make sure the callers do a pgprot_noncached() on vma->vm_page_prot. Pointed out by Hugh Dickens. Signed-off-by: David S. Miller --- drivers/sbus/char/flash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/sbus') diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 6bdd768b731d..2beb3dded087 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c @@ -71,9 +71,8 @@ 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)); - pgprot_val(vma->vm_page_prot) &= ~(_PAGE_CACHE); - pgprot_val(vma->vm_page_prot) |= _PAGE_E; 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)) return -EAGAIN; -- cgit v1.2.1