Lines Matching full:caching
26 /* Pooling of allocated pages is necessary because changing the caching
132 /* Reset the caching and pages of size 1 << order */
133 static void ttm_pool_free_page(struct ttm_pool *pool, enum ttm_caching caching, in ttm_pool_free_page() argument
144 if (caching != ttm_cached && !PageHighMem(p)) in ttm_pool_free_page()
163 /* Apply a new caching to an array of pages */
165 enum ttm_caching caching) in ttm_pool_apply_caching() argument
173 switch (caching) { in ttm_pool_apply_caching()
260 enum ttm_caching caching, unsigned int order) in ttm_pool_type_init() argument
263 pt->caching = caching; in ttm_pool_type_init()
283 ttm_pool_free_page(pt->pool, pt->caching, pt->order, p); in ttm_pool_type_fini()
286 /* Return the pool_type to use for the given caching and order */
288 enum ttm_caching caching, in ttm_pool_select_type() argument
292 return &pool->caching[caching].orders[order]; in ttm_pool_select_type()
295 switch (caching) { in ttm_pool_select_type()
298 return &pool->caching[caching].orders[order]; in ttm_pool_select_type()
306 return &pool->caching[caching].orders[order]; in ttm_pool_select_type()
335 ttm_pool_free_page(pt->pool, pt->caching, pt->order, p); in ttm_pool_shrink()
383 * @caching: The page caching mode used by the range.
393 enum ttm_caching caching, in ttm_pool_free_range() argument
408 pt = ttm_pool_select_type(pool, caching, order); in ttm_pool_free_range()
412 ttm_pool_free_page(pool, caching, order, *pages); in ttm_pool_free_range()
433 struct page **caching = tt->pages; in ttm_pool_alloc() local
461 page_caching = tt->caching; in ttm_pool_alloc()
462 pt = ttm_pool_select_type(pool, tt->caching, order); in ttm_pool_alloc()
465 r = ttm_pool_apply_caching(caching, pages, in ttm_pool_alloc()
466 tt->caching); in ttm_pool_alloc()
470 caching = pages; in ttm_pool_alloc()
479 caching = pages; in ttm_pool_alloc()
492 r = ttm_pool_apply_caching(caching, pages, in ttm_pool_alloc()
493 tt->caching); in ttm_pool_alloc()
496 caching = 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()
528 ttm_pool_free_range(pool, tt, tt->caching, 0, caching_divide); in ttm_pool_alloc()
545 ttm_pool_free_range(pool, tt, tt->caching, 0, tt->num_pages); in ttm_pool_free()
581 if (pt != &pool->caching[i].orders[j]) in ttm_pool_init()
619 if (pt != &pool->caching[i].orders[j]) in ttm_pool_fini()
755 ttm_pool_debugfs_orders(pool->caching[i].orders, m); in ttm_pool_debugfs()