Lines Matching refs:refs
52 grant_ref_t *refs; member
445 int count, u32 domid, u32 *refs, u32 *fd) in dmabuf_exp_from_refs() argument
457 map->grants[i].ref = refs[i]; in dmabuf_exp_from_refs()
496 dmabuf_imp_grant_foreign_access(struct page **pages, u32 *refs, in dmabuf_imp_grant_foreign_access() argument
520 refs[i] = cur_ref; in dmabuf_imp_grant_foreign_access()
530 static void dmabuf_imp_end_foreign_access(u32 *refs, int count) in dmabuf_imp_end_foreign_access() argument
535 if (refs[i] != GRANT_INVALID_REF) in dmabuf_imp_end_foreign_access()
536 gnttab_end_foreign_access(refs[i], 0, 0UL); in dmabuf_imp_end_foreign_access()
542 kfree(gntdev_dmabuf->u.imp.refs); in dmabuf_imp_free_storage()
555 gntdev_dmabuf->u.imp.refs = kcalloc(count, in dmabuf_imp_alloc_storage()
556 sizeof(gntdev_dmabuf->u.imp.refs[0]), in dmabuf_imp_alloc_storage()
558 if (!gntdev_dmabuf->u.imp.refs) in dmabuf_imp_alloc_storage()
570 gntdev_dmabuf->u.imp.refs[i] = GRANT_INVALID_REF; in dmabuf_imp_alloc_storage()
654 gntdev_dmabuf->u.imp.refs, in dmabuf_imp_to_refs()
668 dmabuf_imp_end_foreign_access(gntdev_dmabuf->u.imp.refs, count); in dmabuf_imp_to_refs()
714 dmabuf_imp_end_foreign_access(gntdev_dmabuf->u.imp.refs, in dmabuf_imp_release()
744 u32 *refs; in gntdev_ioctl_dmabuf_exp_from_refs() local
759 refs = kcalloc(op.count, sizeof(*refs), GFP_KERNEL); in gntdev_ioctl_dmabuf_exp_from_refs()
760 if (!refs) in gntdev_ioctl_dmabuf_exp_from_refs()
763 if (copy_from_user(refs, u->refs, sizeof(*refs) * op.count) != 0) { in gntdev_ioctl_dmabuf_exp_from_refs()
769 op.domid, refs, &op.fd); in gntdev_ioctl_dmabuf_exp_from_refs()
777 kfree(refs); in gntdev_ioctl_dmabuf_exp_from_refs()
812 if (copy_to_user(u->refs, gntdev_dmabuf->u.imp.refs, in gntdev_ioctl_dmabuf_imp_to_refs()
813 sizeof(*u->refs) * op.count) != 0) { in gntdev_ioctl_dmabuf_imp_to_refs()