mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 06:33:31 +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:
parent
686b9d44f4
commit
c738f4b029
@ -32,7 +32,11 @@ void * dma_alloc_attrs(struct device * dev,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
addr = lx_emul_mem_alloc_aligned(size, PAGE_SIZE);
|
||||
#else
|
||||
addr = lx_emul_mem_alloc_aligned_uncached(size, PAGE_SIZE);
|
||||
#endif
|
||||
*dma_handle = lx_emul_mem_dma_addr(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)
|
||||
{
|
||||
#ifdef CONFIG_X86
|
||||
void * ret =
|
||||
lx_emul_mem_alloc_aligned(pool->size, pool->align);
|
||||
#else
|
||||
void * ret =
|
||||
lx_emul_mem_alloc_aligned_uncached(pool->size, pool->align);
|
||||
#endif
|
||||
*handle = lx_emul_mem_dma_addr(ret);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user