Lines Matching refs:tidbuf

57 static u32 find_phys_blocks(struct tid_user_buf *tidbuf, unsigned int npages);
193 struct tid_user_buf *tidbuf, in unpin_rcv_pages() argument
207 pages = &tidbuf->pages[idx]; in unpin_rcv_pages()
216 static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf) in pin_rcv_pages() argument
220 unsigned long vaddr = tidbuf->vaddr; in pin_rcv_pages()
225 npages = num_user_pages(vaddr, tidbuf->length); in pin_rcv_pages()
261 tidbuf->pages = pages; in pin_rcv_pages()
262 tidbuf->npages = npages; in pin_rcv_pages()
325 struct tid_user_buf *tidbuf; in hfi1_user_exp_rcv_setup() local
330 tidbuf = kzalloc(sizeof(*tidbuf), GFP_KERNEL); in hfi1_user_exp_rcv_setup()
331 if (!tidbuf) in hfi1_user_exp_rcv_setup()
334 tidbuf->vaddr = tinfo->vaddr; in hfi1_user_exp_rcv_setup()
335 tidbuf->length = tinfo->length; in hfi1_user_exp_rcv_setup()
336 tidbuf->psets = kcalloc(uctxt->expected_count, sizeof(*tidbuf->psets), in hfi1_user_exp_rcv_setup()
338 if (!tidbuf->psets) { in hfi1_user_exp_rcv_setup()
339 kfree(tidbuf); in hfi1_user_exp_rcv_setup()
343 pinned = pin_rcv_pages(fd, tidbuf); in hfi1_user_exp_rcv_setup()
345 kfree(tidbuf->psets); in hfi1_user_exp_rcv_setup()
346 kfree(tidbuf); in hfi1_user_exp_rcv_setup()
351 tidbuf->n_psets = find_phys_blocks(tidbuf, pinned); in hfi1_user_exp_rcv_setup()
359 if (fd->tid_used + tidbuf->n_psets > fd->tid_limit) in hfi1_user_exp_rcv_setup()
362 pageset_count = tidbuf->n_psets; in hfi1_user_exp_rcv_setup()
390 ret = program_rcvarray(fd, tidbuf, grp, in hfi1_user_exp_rcv_setup()
436 ret = program_rcvarray(fd, tidbuf, grp, in hfi1_user_exp_rcv_setup()
497 unpin_rcv_pages(fd, tidbuf, NULL, mapped_pages, in hfi1_user_exp_rcv_setup()
500 kfree(tidbuf->psets); in hfi1_user_exp_rcv_setup()
502 kfree(tidbuf->pages); in hfi1_user_exp_rcv_setup()
503 kfree(tidbuf); in hfi1_user_exp_rcv_setup()
589 static u32 find_phys_blocks(struct tid_user_buf *tidbuf, unsigned int npages) in find_phys_blocks() argument
593 struct page **pages = tidbuf->pages; in find_phys_blocks()
594 struct tid_pageset *list = tidbuf->psets; in find_phys_blocks()