Lines Matching full:pages

26 /* Pooling of allocated pages is necessary because changing the caching
68 MODULE_PARM_DESC(page_pool_size, "Number of pages in the WC/UC/DMA pool");
85 /* Allocate pages of size 1 << order with the given gfp_flags */
95 * Mapping pages directly into an userspace process and calling in ttm_pool_alloc_page()
139 /* Reset the caching and pages of size 1 << order */
254 /* Apply a new caching to an array of pages */
278 /* Map pages of 1 << order size and fill the DMA address array */
305 /* Unmap pages of 1 << order size */
344 /* Give pages into a specific pool_type */
367 /* Take pages from a specific pool_type, return NULL when nothing available */
394 INIT_LIST_HEAD(&pt->pages); in ttm_pool_type_init()
402 /* Remove a pool_type from the global shrinker list and free all pages */
456 /* Free pages using the global shrinker list */
499 struct vm_page ***pages, in ttm_pool_page_allocated() argument
512 for (i = 1 << order; i; --i, ++(*pages), ++p, ++(*orders)) { in ttm_pool_page_allocated()
513 **pages = p; in ttm_pool_page_allocated()
521 * ttm_pool_free_range() - Free a range of TTM pages
529 * pages with different attributes if allocation hit an error without being
537 struct vm_page **pages = &tt->pages[start_page]; in ttm_pool_free_range() local
541 for (i = start_page; i < end_page; i += nr, pages += nr) { in ttm_pool_free_range()
551 ttm_pool_type_give(pt, *pages); in ttm_pool_free_range()
553 ttm_pool_free_page(pool, caching, order, *pages); in ttm_pool_free_range()
564 * Fill the ttm_tt object with pages and also make sure to DMA map them when
574 struct vm_page **caching = tt->pages; in ttm_pool_alloc()
575 struct vm_page **pages = tt->pages; in ttm_pool_alloc() local
609 r = ttm_pool_apply_caching(caching, pages, in ttm_pool_alloc()
614 caching = pages; in ttm_pool_alloc()
619 &pages, &orders); in ttm_pool_alloc()
623 caching = pages; in ttm_pool_alloc()
636 r = ttm_pool_apply_caching(caching, pages, in ttm_pool_alloc()
640 caching = pages; in ttm_pool_alloc()
643 &num_pages, &pages, &orders); in ttm_pool_alloc()
647 caching = pages; in ttm_pool_alloc()
660 r = ttm_pool_apply_caching(caching, pages, tt->caching); in ttm_pool_alloc()
671 caching_divide = caching - tt->pages; in ttm_pool_alloc()
680 * ttm_pool_free - Free the backing pages from a ttm_tt object
682 * @pool: Pool to give pages back to.
685 * Give the packing pages back to a pool or free them
739 * Free all pages in the pool and unregister the types from the global
759 * that no shrinker is concurrently freeing pages from the pool. in ttm_pool_fini()
765 /* As long as pages are available make sure to release at least one */
778 /* Return the number of pages available or SHRINK_EMPTY if we have none */
795 /* Count the number of pages available in a pool_type */
832 /* Dump the total amount of allocated pages */
922 * @num_pages: default number of pages