which was partly missed when the 4.4 ttm changes went in.
Prompted by a patch from kettenis@
pgprot_t ttm_io_prot(uint32_t caching_flags, pgprot_t tmp)
{
+ /* Cached mappings need no adjustment */
+ if (caching_flags & TTM_PL_FLAG_CACHED)
+ return tmp;
#ifdef PMAP_WC
if (caching_flags & TTM_PL_FLAG_WC)
return PMAP_WC;
pmap_flags = ttm_io_prot(bo->mem.placement, 0);
} else {
ttm = bo->ttm;
- pmap_flags = (bo->mem.placement & TTM_PL_FLAG_CACHED) ?
- 0 : ttm_io_prot(bo->mem.placement, 0);
+ pmap_flags = ttm_io_prot(bo->mem.placement, 0);
/* Allocate all page at once, most common usage */
if (ttm->bdev->driver->ttm_tt_populate(ttm)) {