On Tue, May 13, 2008 at 03:55:29PM +0200, Johann Baudy wrote:
quoted text > 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().
Hi Johann,
what kernel are you using? Similar problems were reported before, and
we've already applied a patch that should fix it. I think it hit
mainline shortly before the 2.6.25 release. uio_mmap() should work with
kernels >= 2.6.25 for PPC.
Thanks,
Hans
--
unsubscribe notice To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Messages in current thread:
Re: UIO: phys_mem_access_prot() miss? , Hans J. Koch , (Tue May 13, 2:51 pm)