Skip to content

Commit

Permalink
UIO: add pgprot_noncached() to UIO mmap code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean-Samuel Chenard authored and Greg Kroah-Hartman committed Mar 25, 2008
1 parent 7c12c92 commit c9698d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/uio/uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c9698d6

Please sign in to comment.