Lines Matching defs:pages

122  * Release pinned receive buffer pages.
124 * @mapped: true if the pages have been DMA mapped. false otherwise.
126 * @npages: No of pages to unpin.
128 * If the pages have been DMA mapped (indicated by mapped parameter), their
139 struct page **pages;
146 pages = &node->pages[idx];
149 pages = &tidbuf->pages[idx];
152 hfi1_release_user_pages(mm, pages, npages, mapped);
157 * Pin receive buffer pages.
164 struct page **pages = NULL;
173 pages = kcalloc(npages, sizeof(*pages), GFP_KERNEL);
174 if (!pages)
178 * Pin all the pages of the user buffer. If we can't pin all the
179 * pages, accept the amount pinned so far and program only that.
183 kfree(pages);
187 pinned = hfi1_acquire_user_pages(current->mm, vaddr, npages, true, pages);
189 kfree(pages);
192 tidbuf->pages = pages;
215 * made by finding all sets of physically contiguous pages in a
219 * resulting sets of pages are stored in struct tid_pageset,
221 * * .count - number of pages in this set
294 /* Find sets of physically contiguous pages */
409 hfi1_cdbg(TID, "total mapped: tidpairs:%u pages:%u (%d)", tididx,
424 /* unpin all pages not covered by a TID */
453 kfree(tidbuf->pages);
476 kfree(tidbuf->pages);
569 struct page **pages = tidbuf->pages;
576 * Look for sets of physically contiguous pages in the user buffer.
580 pfn = page_to_pfn(pages[0]);
582 this_pfn = i < npages ? page_to_pfn(pages[i]) : 0;
585 * If the pfn's are not sequential, pages are not physically
591 * physically contiguous pages and break them down it
642 * @pmapped: (output parameter) number of pages programmed into the RcvArray
733 struct page **pages = tbuf->pages + pageidx;
739 node = kzalloc(struct_size(node, pages, npages), GFP_KERNEL);
743 phys = dma_map_single(&dd->pcidev->dev, __va(page_to_phys(pages[0])),
746 dd_dev_err(dd, "Failed to DMA map Exp Rcv pages 0x%llx\n",
754 node->phys = page_to_phys(pages[0]);
760 memcpy(node->pages, pages, flex_array_size(node, pages, npages));
833 /* Make sure device has seen the write before pages are unpinned */