}
return d_page;
}
-static enum pool_type ttm_to_type(int flags, enum ttm_caching_state cstate)
+static enum pool_type ttm_to_type(int flags, enum ttm_caching cstate)
{
enum pool_type type = IS_UNDEFINED;
if (flags & TTM_PAGE_FLAG_DMA32)
type |= IS_DMA32;
- if (cstate == tt_cached)
+ if (cstate == ttm_cached)
type |= IS_CACHED;
- else if (cstate == tt_uncached)
+ else if (cstate == ttm_uncached)
type |= IS_UC;
else
type |= IS_WC;
* are pages that have changed their caching state already put them to the
* pool.
*/
-static void ttm_dma_handle_caching_state_failure(struct dma_pool *pool,
+static void ttm_dma_handle_caching_failure(struct dma_pool *pool,
struct list_head *d_pages,
struct page **failed_pages,
unsigned cpages)
r = ttm_set_pages_caching(pool, caching_array,
cpages);
if (r)
- ttm_dma_handle_caching_state_failure(
+ ttm_dma_handle_caching_failure(
pool, d_pages, caching_array,
cpages);
}
r = ttm_set_pages_caching(pool, caching_array,
cpages);
if (r) {
- ttm_dma_handle_caching_state_failure(
+ ttm_dma_handle_caching_failure(
pool, d_pages, caching_array,
cpages);
goto out;
if (cpages) {
r = ttm_set_pages_caching(pool, caching_array, cpages);
if (r)
- ttm_dma_handle_caching_state_failure(pool, d_pages,
+ ttm_dma_handle_caching_failure(pool, d_pages,
caching_array, cpages);
}
out:
INIT_LIST_HEAD(&ttm_dma->pages_list);
i = 0;
- type = ttm_to_type(ttm->page_flags, ttm->caching_state);
+ type = ttm_to_type(ttm->page_flags, ttm->caching);
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
if (ttm->page_flags & TTM_PAGE_FLAG_DMA32)
unsigned count, i, npages = 0;
unsigned long irq_flags;
- type = ttm_to_type(ttm->page_flags, ttm->caching_state);
+ type = ttm_to_type(ttm->page_flags, ttm->caching);
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
pool = ttm_dma_find_pool(dev, type | IS_HUGE);
return;
is_cached = (ttm_dma_find_pool(pool->dev,
- ttm_to_type(ttm->page_flags, tt_cached)) == pool);
+ ttm_to_type(ttm->page_flags, ttm_cached)) == pool);
/* make sure pages array match list and count number of pages */
count = 0;