Lines Matching full:pages
26 /* Pooling of allocated pages is necessary because changing the caching
63 MODULE_PARM_DESC(page_pool_size, "Number of pages in the WC/UC/DMA pool");
78 /* Allocate pages of size 1 << order with the given gfp_flags */
88 * Mapping pages directly into an userspace process and calling in ttm_pool_alloc_page()
131 /* Reset the caching and pages of size 1 << order */
162 /* Apply a new caching to an array of pages */
184 /* Map pages of 1 << order size and fill the DMA address array */
211 /* Unmap pages of 1 << order size */
223 /* Give pages into a specific pool_type */
236 list_add(&p->lru, &pt->pages); in ttm_pool_type_give()
241 /* Take pages from a specific pool_type, return NULL when nothing available */
247 p = list_first_entry_or_null(&pt->pages, typeof(*p), lru); in ttm_pool_type_take()
265 INIT_LIST_HEAD(&pt->pages); in ttm_pool_type_init()
272 /* Remove a pool_type from the global shrinker list and free all pages */
313 /* Free pages using the global shrinker list */
352 struct page ***pages) in ttm_pool_page_allocated() argument
364 for (i = 1 << order; i; --i, ++(*pages), ++p) in ttm_pool_page_allocated()
365 **pages = p; in ttm_pool_page_allocated()
371 * ttm_pool_free_range() - Free a range of TTM pages
379 * pages with different attributes if allocation hit an error without being
387 struct page **pages = tt->pages; in ttm_pool_free_range() local
391 for (i = start_page; i < end_page; i += nr, pages += nr) { in ttm_pool_free_range()
394 order = ttm_pool_page_order(pool, *pages); in ttm_pool_free_range()
401 ttm_pool_type_give(pt, *pages); in ttm_pool_free_range()
403 ttm_pool_free_page(pool, caching, order, *pages); in ttm_pool_free_range()
414 * Fill the ttm_tt object with pages and also make sure to DMA map them when
424 struct page **caching = tt->pages; in ttm_pool_alloc()
425 struct page **pages = tt->pages; in ttm_pool_alloc() local
456 r = ttm_pool_apply_caching(caching, pages, in ttm_pool_alloc()
461 caching = pages; in ttm_pool_alloc()
466 &pages); in ttm_pool_alloc()
470 caching = pages; in ttm_pool_alloc()
483 r = ttm_pool_apply_caching(caching, pages, in ttm_pool_alloc()
487 caching = pages; in ttm_pool_alloc()
490 &num_pages, &pages); in ttm_pool_alloc()
494 caching = pages; in ttm_pool_alloc()
507 r = ttm_pool_apply_caching(caching, pages, tt->caching); in ttm_pool_alloc()
518 caching_divide = caching - tt->pages; in ttm_pool_alloc()
527 * ttm_pool_free - Free the backing pages from a ttm_tt object
529 * @pool: Pool to give pages back to.
532 * Give the packing pages back to a pool or free them
580 * Free all pages in the pool and unregister the types from the global
594 * that no shrinker is concurrently freeing pages from the pool. in ttm_pool_fini()
600 /* As long as pages are available make sure to release at least one */
613 /* Return the number of pages available or SHRINK_EMPTY if we have none */
623 /* Count the number of pages available in a pool_type */
631 list_for_each_entry(p, &pt->pages, lru) in ttm_pool_type_count()
660 /* Dump the total amount of allocated pages */
750 * @num_pages: default number of pages