diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-03-21 05:29:39 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-22 04:15:13 -0500 |
commit | 14778d9072e53d2171f66ffd9657daff41acfaed (patch) | |
tree | 3b60565ec1e957800fc3bf4743497202a24f8279 /drivers/sbus/char | |
parent | e952f31bce6e9f64db01f607abc46529ba57ac9e (diff) |
[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 <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus/char')
-rw-r--r-- | drivers/sbus/char/flash.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) | |||
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 | pgprot_val(vma->vm_page_prot) &= ~(_PAGE_CACHE); | ||
75 | pgprot_val(vma->vm_page_prot) |= _PAGE_E; | ||
76 | vma->vm_flags |= (VM_SHM | VM_LOCKED); | 74 | vma->vm_flags |= (VM_SHM | VM_LOCKED); |
75 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
77 | 76 | ||
78 | if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) | 77 | if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) |
79 | return -EAGAIN; | 78 | return -EAGAIN; |