lkml.org 
[lkml]   [2008]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectUIO: phys_mem_access_prot() miss?
Hi Hans, Greg,

I need some help on UIO driver.
I have to add this below workaround (in uio.c) to be able to access
phys memory from user space.
I'm currently using PPC arch.
Am I wrong? or Is it a miss?

static int uio_mmap(struct file *filep, struct vm_area_struct *vma)
{

...
switch (idev->info->mem[mi].memtype) {
case UIO_MEM_PHYS:
+ vma->vm_page_prot = phys_mem_access_prot(filep,
+ idev->info->mem[mi].addr >> PAGE_SHIFT,
+ vma->vm_end - vma->vm_start,
+ vma->vm_page_prot);
return uio_mmap_physical(vma);
case UIO_MEM_LOGICAL:
...

}

FYI: I've copied those lines from mem char driver in mmap_mem().

Thanks in advance,
Johann


\
 
 \ /
  Last update: 2008-05-13 15:57    [W:0.063 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site