Lines Matching refs:nr_pages
43 int nr_pages; member
49 ((idx) % ((unsigned long)(buf)->nr_pages << PAGE_SHIFT))
121 tmc_etr_sg_table_entries(int nr_pages) in tmc_etr_sg_table_entries() argument
123 unsigned long nr_sgpages = nr_pages * ETR_SG_PAGES_PER_SYSPAGE; in tmc_etr_sg_table_entries()
146 for (i = 0; i < tmc_pages->nr_pages; i++) { in tmc_pages_get_offset()
166 for (i = 0; i < tmc_pages->nr_pages; i++) { in tmc_pages_free()
178 tmc_pages->nr_pages = 0; in tmc_pages_free()
193 int i, nr_pages; in tmc_pages_alloc() local
198 nr_pages = tmc_pages->nr_pages; in tmc_pages_alloc()
199 tmc_pages->daddrs = kcalloc(nr_pages, sizeof(*tmc_pages->daddrs), in tmc_pages_alloc()
203 tmc_pages->pages = kcalloc(nr_pages, sizeof(*tmc_pages->pages), in tmc_pages_alloc()
211 for (i = 0; i < nr_pages; i++) { in tmc_pages_alloc()
277 table_pages->nr_pages, in tmc_alloc_table_pages()
297 sg_table->data_pages.nr_pages, in tmc_alloc_data_pages()
329 sg_table->data_pages.nr_pages = nr_dpages; in tmc_alloc_sg_table()
330 sg_table->table_pages.nr_pages = nr_tpages; in tmc_alloc_sg_table()
361 index = i % data->nr_pages; in tmc_sg_table_sync_data_range()
375 for (i = 0; i < table_pages->nr_pages; i++) in tmc_sg_table_sync_table()
500 nr_entries = tmc_etr_sg_table_entries(sg_table->data_pages.nr_pages); in tmc_etr_sg_table_populate()
1255 int nr_pages, void **pages, bool snapshot) in alloc_etr_buf() argument
1266 if ((nr_pages << PAGE_SHIFT) > drvdata->size) { in alloc_etr_buf()
1267 etr_buf = tmc_alloc_etr_buf(drvdata, ((ssize_t)nr_pages << PAGE_SHIFT), in alloc_etr_buf()
1293 struct perf_event *event, int nr_pages, in get_perf_etr_buf_cpu_wide() argument
1330 etr_buf = alloc_etr_buf(drvdata, event, nr_pages, pages, snapshot); in get_perf_etr_buf_cpu_wide()
1357 struct perf_event *event, int nr_pages, in get_perf_etr_buf_per_thread() argument
1364 return alloc_etr_buf(drvdata, event, nr_pages, pages, snapshot); in get_perf_etr_buf_per_thread()
1369 int nr_pages, void **pages, bool snapshot) in get_perf_etr_buf() argument
1372 return get_perf_etr_buf_per_thread(drvdata, event, nr_pages, in get_perf_etr_buf()
1375 return get_perf_etr_buf_cpu_wide(drvdata, event, nr_pages, in get_perf_etr_buf()
1381 int nr_pages, void **pages, bool snapshot) in tmc_etr_setup_perf_buf() argument
1393 etr_buf = get_perf_etr_buf(drvdata, event, nr_pages, pages, snapshot); in tmc_etr_setup_perf_buf()
1414 int nr_pages, bool snapshot) in tmc_alloc_etr_buffer() argument
1420 nr_pages, pages, snapshot); in tmc_alloc_etr_buffer()
1428 etr_perf->nr_pages = nr_pages; in tmc_alloc_etr_buffer()
1511 if (++pg_idx == etr_perf->nr_pages) in tmc_etr_sync_perf_buffer()