Lines Matching refs:page
14 struct hns_roce_user_db_page *page; in hns_roce_db_map_user() local
20 list_for_each_entry(page, &context->page_list, list) in hns_roce_db_map_user()
21 if (page->user_virt == page_addr) in hns_roce_db_map_user()
24 page = kmalloc(sizeof(*page), GFP_KERNEL); in hns_roce_db_map_user()
25 if (!page) { in hns_roce_db_map_user()
30 refcount_set(&page->refcount, 1); in hns_roce_db_map_user()
31 page->user_virt = page_addr; in hns_roce_db_map_user()
32 page->umem = ib_umem_get(context->ibucontext.device, page_addr, in hns_roce_db_map_user()
34 if (IS_ERR(page->umem)) { in hns_roce_db_map_user()
35 ret = PTR_ERR(page->umem); in hns_roce_db_map_user()
36 kfree(page); in hns_roce_db_map_user()
40 list_add(&page->list, &context->page_list); in hns_roce_db_map_user()
44 db->dma = sg_dma_address(page->umem->sgt_append.sgt.sgl) + offset; in hns_roce_db_map_user()
45 db->virt_addr = sg_virt(page->umem->sgt_append.sgt.sgl) + offset; in hns_roce_db_map_user()
46 db->u.user_page = page; in hns_roce_db_map_user()
47 refcount_inc(&page->refcount); in hns_roce_db_map_user()
83 pgdir->page = dma_alloc_coherent(dma_device, PAGE_SIZE, in hns_roce_alloc_db_pgdir()
85 if (!pgdir->page) { in hns_roce_alloc_db_pgdir()
117 db->db_record = pgdir->page + db->index; in hns_roce_alloc_db_from_pgdir()
173 dma_free_coherent(hr_dev->dev, PAGE_SIZE, db->u.pgdir->page, in hns_roce_free_db()