From: Jean-Samuel Chenard Date: Fri, 14 Mar 2008 10:28:36 +0000 (+0100) Subject: UIO: add pgprot_noncached() to UIO mmap code X-Git-Tag: MMI-PSA29.97-13-9~35865^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c9698d6b1a90929e427a165bd8283f803f57d9bd;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git UIO: add pgprot_noncached() to UIO mmap code 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 Signed-off-by: Hans J Koch Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index e8a01f264540..11759080ca54 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -470,6 +470,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,