Commit c9698d6b1a90929e427a165bd8283f803f57d9bd

Authored by Jean-Samuel Chenard
Committed by Greg Kroah-Hartman
1 parent 7c12c92fba

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 <jsamch@gmail.com>
Signed-off-by: Hans J Koch <hjk@linutronix.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -470,6 +470,8 @@
470 470  
471 471 vma->vm_flags |= VM_IO | VM_RESERVED;
472 472  
  473 + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
  474 +
473 475 return remap_pfn_range(vma,
474 476 vma->vm_start,
475 477 idev->info->mem[mi].addr >> PAGE_SHIFT,