Lines Matching refs:gref
87 grant_ref_t gref;
330 gnt_list_entry->gref = GRANT_INVALID_REF;
359 if (gnt_list_entry->gref != GRANT_INVALID_REF)
368 gnttab_page_grant_foreign_access_ref_one(gnt_list_entry->gref,
381 if (gnt_list_entry->gref != GRANT_INVALID_REF)
384 /* Assign a gref to this page */
385 gnt_list_entry->gref = gnttab_claim_grant_reference(gref_head);
386 BUG_ON(gnt_list_entry->gref == -ENOSPC);
391 gnttab_grant_foreign_access_ref(gnt_list_entry->gref,
405 if (gnt_list_entry->gref != GRANT_INVALID_REF)
408 /* Assign a gref to this page */
409 gnt_list_entry->gref = gnttab_claim_grant_reference(gref_head);
410 BUG_ON(gnt_list_entry->gref == -ENOSPC);
644 ring_req->u.indirect.indirect_grefs[n] = gnt_list_entry->gref;
648 ref = gnt_list_entry->gref;
681 .gref = ref,
687 .gref = ref,
1298 if (persistent_gnt->gref != GRANT_INVALID_REF) {
1299 gnttab_end_foreign_access(persistent_gnt->gref,
1323 gnttab_end_foreign_access(persistent_gnt->gref, 0, 0UL);
1338 gnttab_end_foreign_access(persistent_gnt->gref, 0, 0UL);
1532 if (!gnttab_try_end_foreign_access(s->grants_used[i]->gref)) {
1541 s->grants_used[i]->gref);
1552 s->grants_used[i]->gref = GRANT_INVALID_REF;
1558 if (!gnttab_try_end_foreign_access(s->indirect_grants[i]->gref)) {
1561 s->indirect_grants[i]->gref);
1577 s->indirect_grants[i]->gref = GRANT_INVALID_REF;
1761 grant_ref_t gref[XENBUS_MAX_RING_GRANTS];
1774 err = xenbus_grant_ring(dev, rinfo->ring.sring, info->nr_ring_pages, gref);
1781 rinfo->ring_ref[i] = gref[i];
2759 if (gnt_list_entry->gref == GRANT_INVALID_REF ||
2760 !gnttab_try_end_foreign_access(gnt_list_entry->gref))
2765 gnt_list_entry->gref = GRANT_INVALID_REF;