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");
79 /* Allocate pages of size 1 << order with the given gfp_flags */
89 * Mapping pages directly into an userspace process and calling in ttm_pool_alloc_page()
132 /* Reset the caching and pages of size 1 << order */
163 /* Apply a new caching to an array of pages */
185 /* Map pages of 1 << order size and fill the DMA address array */
212 /* Unmap pages of 1 << order size */
224 /* Give pages into a specific pool_type */
237 list_add(&p->lru, &pt->pages); in ttm_pool_type_give()
242 /* Take pages from a specific pool_type, return NULL when nothing available */
248 p = list_first_entry_or_null(&pt->pages, typeof(*p), lru); in ttm_pool_type_take()
266 INIT_LIST_HEAD(&pt->pages); in ttm_pool_type_init()
273 /* Remove a pool_type from the global shrinker list and free all pages */
320 /* Free pages using the global shrinker list */
361 struct page ***pages) in ttm_pool_page_allocated() argument
373 for (i = 1 << order; i; --i, ++(*pages), ++p) in ttm_pool_page_allocated()
374 **pages = p; in ttm_pool_page_allocated()
380 * ttm_pool_free_range() - Free a range of TTM pages
388 * pages with different attributes if allocation hit an error without being
396 struct page **pages = &tt->pages[start_page]; in ttm_pool_free_range() local
400 for (i = start_page; i < end_page; i += nr, pages += nr) { in ttm_pool_free_range()
403 order = ttm_pool_page_order(pool, *pages); in ttm_pool_free_range()
410 ttm_pool_type_give(pt, *pages); in ttm_pool_free_range()
412 ttm_pool_free_page(pool, caching, order, *pages); in ttm_pool_free_range()
423 * Fill the ttm_tt object with pages and also make sure to DMA map them when
433 struct page **caching = tt->pages; in ttm_pool_alloc()
434 struct page **pages = tt->pages; in ttm_pool_alloc() local
465 r = ttm_pool_apply_caching(caching, pages, in ttm_pool_alloc()
470 caching = pages; in ttm_pool_alloc()
475 &pages); in ttm_pool_alloc()
479 caching = pages; in ttm_pool_alloc()
492 r = ttm_pool_apply_caching(caching, pages, in ttm_pool_alloc()
496 caching = pages; in ttm_pool_alloc()
499 &num_pages, &pages); in ttm_pool_alloc()
503 caching = pages; in ttm_pool_alloc()
516 r = ttm_pool_apply_caching(caching, pages, tt->caching); in ttm_pool_alloc()
527 caching_divide = caching - tt->pages; in ttm_pool_alloc()
536 * ttm_pool_free - Free the backing pages from a ttm_tt object
538 * @pool: Pool to give pages back to.
541 * Give the packing pages back to a pool or free them
607 * Free all pages in the pool and unregister the types from the global
627 * that no shrinker is concurrently freeing pages from the pool. in ttm_pool_fini()
633 /* As long as pages are available make sure to release at least one */
646 /* Return the number of pages available or SHRINK_EMPTY if we have none */
656 /* Count the number of pages available in a pool_type */
664 list_for_each_entry(p, &pt->pages, lru) in ttm_pool_type_count()
693 /* Dump the total amount of allocated pages */
783 * @num_pages: default number of pages