Lines Matching refs:mi
258 int mi, pi; in uio_dev_add_attributes() local
270 for (mi = 0; mi < MAX_UIO_MAPS; mi++) { in uio_dev_add_attributes()
271 mem = &idev->info->mem[mi]; in uio_dev_add_attributes()
287 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi); in uio_dev_add_attributes()
331 for (mi--; mi>=0; mi--) { in uio_dev_add_attributes()
332 mem = &idev->info->mem[mi]; in uio_dev_add_attributes()
589 int mi; in uio_find_mem_index() local
592 for (mi = 0; mi < MAX_UIO_MAPS; mi++) { in uio_find_mem_index()
593 if (idev->info->mem[mi].size == 0) in uio_find_mem_index()
595 if (vma->vm_pgoff == mi) in uio_find_mem_index()
596 return mi; in uio_find_mem_index()
619 int mi = uio_find_mem_index(vma); in uio_vma_fault() local
620 if (mi < 0) in uio_vma_fault()
627 offset = (vmf->pgoff - mi) << PAGE_SHIFT; in uio_vma_fault()
629 if (idev->info->mem[mi].memtype == UIO_MEM_LOGICAL) in uio_vma_fault()
630 page = virt_to_page(idev->info->mem[mi].addr + offset); in uio_vma_fault()
632 page = vmalloc_to_page((void *)idev->info->mem[mi].addr in uio_vma_fault()
648 int mi = uio_find_mem_index(vma); in uio_mmap_physical() local
649 if (mi < 0) in uio_mmap_physical()
658 idev->info->mem[mi].addr >> PAGE_SHIFT, in uio_mmap_physical()
675 int mi; in uio_mmap() local
684 mi = uio_find_mem_index(vma); in uio_mmap()
685 if (mi < 0) in uio_mmap()
689 actual_pages = (idev->info->mem[mi].size + PAGE_SIZE -1) >> PAGE_SHIFT; in uio_mmap()
698 switch (idev->info->mem[mi].memtype) { in uio_mmap()