aboutsummaryrefslogtreecommitdiff
path: root/drivers/uio
diff options
context:
space:
mode:
authorJean-Samuel Chenard <jsamch@gmail.com>2008-03-25 06:35:08 +0000
committerChris Wright <chrisw@sous-sol.org>2008-04-18 18:53:19 -0700
commit2b003ee8211d1e78f257dd91a5a24b425d330a1d (patch)
treea026c3f13a29857dc9751d0068884bb1d9d84d8e /drivers/uio
parent490b69825567385d30f20a1fa1e43dc9573bb815 (diff)
UIO: add pgprot_noncached() to UIO mmap code
upstream commit: c9698d6b1a90929e427a165bd8283f803f57d9bd Mapping of physical memory in UIO needs pgprot_noncached() to ensure that IO memory is not cached. Without pgprot_noncached(), it (accidentally) works on x86 and arm, but fails on PPC. Signed-off-by: Jean-Samuel Chenard <jsamch@gmail.com> Signed-off-by: Hans J Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'drivers/uio')
-rw-r--r--drivers/uio/uio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 865f32b63b5..b4e10225aa6 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -447,6 +447,8 @@ static int uio_mmap_physical(struct vm_area_struct *vma)
vma->vm_flags |= VM_IO | VM_RESERVED;
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+
return remap_pfn_range(vma,
vma->vm_start,
idev->info->mem[mi].addr >> PAGE_SHIFT,