Symbol: gntdev_dmabuf
drivers/xen/gntdev-dmabuf.c
103
obj->gntdev_dmabuf = gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
108
kref_put(&gntdev_dmabuf->u.exp.refcount, dmabuf_exp_release);
drivers/xen/gntdev-dmabuf.c
133
struct gntdev_dmabuf *gntdev_dmabuf)
drivers/xen/gntdev-dmabuf.c
138
if (obj->gntdev_dmabuf == gntdev_dmabuf) {
drivers/xen/gntdev-dmabuf.c
145
static struct gntdev_dmabuf *
drivers/xen/gntdev-dmabuf.c
148
struct gntdev_dmabuf *gntdev_dmabuf, *ret = ERR_PTR(-ENOENT);
drivers/xen/gntdev-dmabuf.c
151
list_for_each_entry(gntdev_dmabuf, &priv->exp_list, next)
drivers/xen/gntdev-dmabuf.c
152
if (gntdev_dmabuf->fd == fd) {
drivers/xen/gntdev-dmabuf.c
154
kref_get(&gntdev_dmabuf->u.exp.refcount);
drivers/xen/gntdev-dmabuf.c
155
ret = gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
165
struct gntdev_dmabuf *gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
175
gntdev_dmabuf = dmabuf_exp_wait_obj_get_dmabuf(priv, fd);
drivers/xen/gntdev-dmabuf.c
176
if (IS_ERR(gntdev_dmabuf))
drivers/xen/gntdev-dmabuf.c
177
return PTR_ERR(gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
184
obj = dmabuf_exp_wait_obj_new(priv, gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
261
struct gntdev_dmabuf *gntdev_dmabuf = attach->dmabuf->priv;
drivers/xen/gntdev-dmabuf.c
264
pr_debug("Mapping %d pages for dev %p\n", gntdev_dmabuf->nr_pages,
drivers/xen/gntdev-dmabuf.c
281
sgt = dmabuf_pages_to_sgt(gntdev_dmabuf->pages,
drivers/xen/gntdev-dmabuf.c
282
gntdev_dmabuf->nr_pages);
drivers/xen/gntdev-dmabuf.c
308
struct gntdev_dmabuf *gntdev_dmabuf =
drivers/xen/gntdev-dmabuf.c
309
container_of(kref, struct gntdev_dmabuf, u.exp.refcount);
drivers/xen/gntdev-dmabuf.c
311
dmabuf_exp_wait_obj_signal(gntdev_dmabuf->priv, gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
312
list_del(&gntdev_dmabuf->next);
drivers/xen/gntdev-dmabuf.c
313
fput(gntdev_dmabuf->priv->filp);
drivers/xen/gntdev-dmabuf.c
314
kfree(gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
328
struct gntdev_dmabuf *gntdev_dmabuf = dma_buf->priv;
drivers/xen/gntdev-dmabuf.c
329
struct gntdev_dmabuf_priv *priv = gntdev_dmabuf->priv;
drivers/xen/gntdev-dmabuf.c
331
dmabuf_exp_remove_map(gntdev_dmabuf->u.exp.priv,
drivers/xen/gntdev-dmabuf.c
332
gntdev_dmabuf->u.exp.map);
drivers/xen/gntdev-dmabuf.c
334
kref_put(&gntdev_dmabuf->u.exp.refcount, dmabuf_exp_release);
drivers/xen/gntdev-dmabuf.c
359
struct gntdev_dmabuf *gntdev_dmabuf __free(kfree) = NULL;
drivers/xen/gntdev-dmabuf.c
365
gntdev_dmabuf = kzalloc_obj(*gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
366
if (!gntdev_dmabuf)
drivers/xen/gntdev-dmabuf.c
369
kref_init(&gntdev_dmabuf->u.exp.refcount);
drivers/xen/gntdev-dmabuf.c
371
gntdev_dmabuf->priv = args->dmabuf_priv;
drivers/xen/gntdev-dmabuf.c
372
gntdev_dmabuf->nr_pages = args->count;
drivers/xen/gntdev-dmabuf.c
373
gntdev_dmabuf->pages = args->pages;
drivers/xen/gntdev-dmabuf.c
374
gntdev_dmabuf->u.exp.priv = args->priv;
drivers/xen/gntdev-dmabuf.c
375
gntdev_dmabuf->u.exp.map = args->map;
drivers/xen/gntdev-dmabuf.c
385
exp_info.priv = gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
387
gntdev_dmabuf->dmabuf = dma_buf_export(&exp_info);
drivers/xen/gntdev-dmabuf.c
388
if (IS_ERR(gntdev_dmabuf->dmabuf))
drivers/xen/gntdev-dmabuf.c
389
return PTR_ERR(gntdev_dmabuf->dmabuf);
drivers/xen/gntdev-dmabuf.c
391
gntdev_dmabuf->fd = ret;
drivers/xen/gntdev-dmabuf.c
396
get_file(gntdev_dmabuf->priv->filp);
drivers/xen/gntdev-dmabuf.c
398
list_add(&gntdev_dmabuf->next, &args->dmabuf_priv->exp_list);
drivers/xen/gntdev-dmabuf.c
401
fd_install(take_fd(ret), no_free_ptr(gntdev_dmabuf)->dmabuf->file);
drivers/xen/gntdev-dmabuf.c
522
static void dmabuf_imp_free_storage(struct gntdev_dmabuf *gntdev_dmabuf)
drivers/xen/gntdev-dmabuf.c
524
kfree(gntdev_dmabuf->u.imp.refs);
drivers/xen/gntdev-dmabuf.c
525
kfree(gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
528
static struct gntdev_dmabuf *dmabuf_imp_alloc_storage(int count)
drivers/xen/gntdev-dmabuf.c
530
struct gntdev_dmabuf *gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
533
gntdev_dmabuf = kzalloc_obj(*gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
534
if (!gntdev_dmabuf)
drivers/xen/gntdev-dmabuf.c
537
gntdev_dmabuf->u.imp.refs = kzalloc_objs(gntdev_dmabuf->u.imp.refs[0],
drivers/xen/gntdev-dmabuf.c
539
if (!gntdev_dmabuf->u.imp.refs)
drivers/xen/gntdev-dmabuf.c
542
gntdev_dmabuf->nr_pages = count;
drivers/xen/gntdev-dmabuf.c
545
gntdev_dmabuf->u.imp.refs[i] = INVALID_GRANT_REF;
drivers/xen/gntdev-dmabuf.c
547
return gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
550
dmabuf_imp_free_storage(gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
555
static struct gntdev_dmabuf *
drivers/xen/gntdev-dmabuf.c
559
struct gntdev_dmabuf *gntdev_dmabuf, *ret;
drivers/xen/gntdev-dmabuf.c
571
gntdev_dmabuf = dmabuf_imp_alloc_storage(count);
drivers/xen/gntdev-dmabuf.c
572
if (IS_ERR(gntdev_dmabuf)) {
drivers/xen/gntdev-dmabuf.c
573
ret = gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
577
gntdev_dmabuf->priv = priv;
drivers/xen/gntdev-dmabuf.c
578
gntdev_dmabuf->fd = fd;
drivers/xen/gntdev-dmabuf.c
586
gntdev_dmabuf->u.imp.attach = attach;
drivers/xen/gntdev-dmabuf.c
60
struct gntdev_dmabuf *gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
603
if (attach->dmabuf->size != gntdev_dmabuf->nr_pages << PAGE_SHIFT) {
drivers/xen/gntdev-dmabuf.c
606
attach->dmabuf->size, gntdev_dmabuf->nr_pages);
drivers/xen/gntdev-dmabuf.c
610
gntdev_dmabuf->u.imp.sgt = sgt;
drivers/xen/gntdev-dmabuf.c
634
gntdev_dmabuf->u.imp.refs,
drivers/xen/gntdev-dmabuf.c
643
list_add(&gntdev_dmabuf->next, &priv->imp_list);
drivers/xen/gntdev-dmabuf.c
646
return gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
649
dmabuf_imp_end_foreign_access(gntdev_dmabuf->u.imp.refs, count);
drivers/xen/gntdev-dmabuf.c
655
dmabuf_imp_free_storage(gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
665
static struct gntdev_dmabuf *
drivers/xen/gntdev-dmabuf.c
668
struct gntdev_dmabuf *q, *gntdev_dmabuf, *ret = ERR_PTR(-ENOENT);
drivers/xen/gntdev-dmabuf.c
671
list_for_each_entry_safe(gntdev_dmabuf, q, &priv->imp_list, next) {
drivers/xen/gntdev-dmabuf.c
672
if (gntdev_dmabuf->fd == fd) {
drivers/xen/gntdev-dmabuf.c
674
ret = gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
675
list_del(&gntdev_dmabuf->next);
drivers/xen/gntdev-dmabuf.c
685
struct gntdev_dmabuf *gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
689
gntdev_dmabuf = dmabuf_imp_find_unlink(priv, fd);
drivers/xen/gntdev-dmabuf.c
690
if (IS_ERR(gntdev_dmabuf))
drivers/xen/gntdev-dmabuf.c
691
return PTR_ERR(gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
695
dmabuf_imp_end_foreign_access(gntdev_dmabuf->u.imp.refs,
drivers/xen/gntdev-dmabuf.c
696
gntdev_dmabuf->nr_pages);
drivers/xen/gntdev-dmabuf.c
698
attach = gntdev_dmabuf->u.imp.attach;
drivers/xen/gntdev-dmabuf.c
700
if (gntdev_dmabuf->u.imp.sgt)
drivers/xen/gntdev-dmabuf.c
701
dma_buf_unmap_attachment_unlocked(attach, gntdev_dmabuf->u.imp.sgt,
drivers/xen/gntdev-dmabuf.c
707
dmabuf_imp_free_storage(gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
713
struct gntdev_dmabuf *q, *gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
715
list_for_each_entry_safe(gntdev_dmabuf, q, &priv->imp_list, next)
drivers/xen/gntdev-dmabuf.c
716
dmabuf_imp_release(priv, gntdev_dmabuf->fd);
drivers/xen/gntdev-dmabuf.c
777
struct gntdev_dmabuf *gntdev_dmabuf;
drivers/xen/gntdev-dmabuf.c
786
gntdev_dmabuf = dmabuf_imp_to_refs(priv->dmabuf_priv,
drivers/xen/gntdev-dmabuf.c
789
if (IS_ERR(gntdev_dmabuf))
drivers/xen/gntdev-dmabuf.c
790
return PTR_ERR(gntdev_dmabuf);
drivers/xen/gntdev-dmabuf.c
792
if (copy_to_user(u->refs, gntdev_dmabuf->u.imp.refs,
drivers/xen/gntdev-dmabuf.c
94
struct gntdev_dmabuf *gntdev_dmabuf)