mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: Hans J Koch <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
7c12c92fba
commit
c9698d6b1a
1 changed files with 2 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue