Lines Matching defs:pages

41  * @nr_pages		- Number of pages in the ring buffer.
42 * @pages - Array of Pages in the ring buffer.
50 void **pages;
107 * @sg_table: Generic SG Table holding the data/table pages.
118 * @nr_pages system pages.
120 * We need to map @nr_pages * ETR_SG_PAGES_PER_SYSPAGE data pages.
142 * tmc_pages_get_offset: Go through all the pages in the tmc_pages
162 * tmc_pages_free : Unmap and free the pages used by tmc_pages.
163 * If the pages were not allocated in tmc_pages_alloc(), we would
176 if (tmc_pages->pages && tmc_pages->pages[i])
177 __free_page(tmc_pages->pages[i]);
180 kfree(tmc_pages->pages);
182 tmc_pages->pages = NULL;
188 * tmc_pages_alloc : Allocate and map pages for a given @tmc_pages.
189 * If @pages is not NULL, the list of page virtual addresses are
190 * used as the data pages. The pages are then dma_map'ed for @dev
197 enum dma_data_direction dir, void **pages)
209 tmc_pages->pages = kcalloc(nr_pages, sizeof(*tmc_pages->pages),
211 if (!tmc_pages->pages) {
218 if (pages && pages[i]) {
219 page = virt_to_page(pages[i]);
232 tmc_pages->pages[i] = page;
268 * Alloc pages for the table. Since this will be used by the device,
269 * allocate the pages closer to the device (i.e, dev_to_node(dev)
282 sg_table->table_vaddr = vmap(table_pages->pages,
293 static int tmc_alloc_data_pages(struct tmc_sg_table *sg_table, void **pages)
297 /* Allocate data pages on the node requested by the caller */
300 DMA_FROM_DEVICE, pages);
302 sg_table->data_vaddr = vmap(sg_table->data_pages.pages,
313 * tmc_alloc_sg_table: Allocate and setup dma pages for the TMC SG table
315 * Table pages.
319 * @nr_tpages - Number of pages for the table entries.
320 * @nr_dpages - Number of pages for Data buffer.
321 * @pages - Optional list of virtual address of pages.
327 void **pages)
340 rc = tmc_alloc_data_pages(sg_table, pages);
412 *bufpp = page_address(data_pages->pages[pg_idx]) + pg_offset;
487 * pages allocated. Each Data page has ETR_SG_PAGES_PER_SYSPAGE SG pages.
565 * @pages - Optional list of page virtual address
569 unsigned long size, void **pages)
582 sg_table = tmc_alloc_sg_table(dev, node, nr_tpages, nr_dpages, pages);
592 /* Sync the table pages for the HW */
604 void **pages)
609 /* We cannot reuse existing pages for flat buf */
610 if (pages)
703 void **pages)
709 etr_buf->size, pages);
820 void **pages)
830 node, pages);
861 * @pages : An optional list of pages.
865 int node, void **pages)
882 etr_buf, node, pages);
885 * If we have to use an existing list of pages, we cannot reliably
896 if (rc && !pages && etr_can_use_flat_mode(&buf_hw, size))
898 etr_buf, node, pages);
901 etr_buf, node, pages);
904 etr_buf, node, pages);
1282 int nr_pages, void **pages, bool snapshot)
1321 void **pages, bool snapshot)
1357 etr_buf = alloc_etr_buf(drvdata, event, nr_pages, pages, snapshot);
1385 void **pages, bool snapshot)
1391 return alloc_etr_buf(drvdata, event, nr_pages, pages, snapshot);
1396 int nr_pages, void **pages, bool snapshot)
1400 pages, snapshot);
1403 pages, snapshot);
1408 int nr_pages, void **pages, bool snapshot)
1420 etr_buf = get_perf_etr_buf(drvdata, event, nr_pages, pages, snapshot);
1440 struct perf_event *event, void **pages,
1447 nr_pages, pages, snapshot);
1456 etr_perf->pages = pages;
1511 dst_pages = (char **)etr_perf->pages;