mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-23 01:08:55 +00:00
dde_linux: use CACHED dma buffers
On x86, DMA buffers are actually always mapped as cached. We should therefore actually ask for a cached buffer in order to avoid confusion. genodelabs/genode#5000
This commit is contained in:
committed by
Christian Helmuth
parent
686b9d44f4
commit
c738f4b029
@ -32,7 +32,11 @@ void * dma_alloc_attrs(struct device * dev,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86
|
||||||
|
addr = lx_emul_mem_alloc_aligned(size, PAGE_SIZE);
|
||||||
|
#else
|
||||||
addr = lx_emul_mem_alloc_aligned_uncached(size, PAGE_SIZE);
|
addr = lx_emul_mem_alloc_aligned_uncached(size, PAGE_SIZE);
|
||||||
|
#endif
|
||||||
*dma_handle = lx_emul_mem_dma_addr(addr);
|
*dma_handle = lx_emul_mem_dma_addr(addr);
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,13 @@ struct dma_pool
|
|||||||
|
|
||||||
void * dma_pool_alloc(struct dma_pool * pool, gfp_t mem_flags, dma_addr_t * handle)
|
void * dma_pool_alloc(struct dma_pool * pool, gfp_t mem_flags, dma_addr_t * handle)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_X86
|
||||||
|
void * ret =
|
||||||
|
lx_emul_mem_alloc_aligned(pool->size, pool->align);
|
||||||
|
#else
|
||||||
void * ret =
|
void * ret =
|
||||||
lx_emul_mem_alloc_aligned_uncached(pool->size, pool->align);
|
lx_emul_mem_alloc_aligned_uncached(pool->size, pool->align);
|
||||||
|
#endif
|
||||||
*handle = lx_emul_mem_dma_addr(ret);
|
*handle = lx_emul_mem_dma_addr(ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user