dma-mapping: make dma_atomic_pool_init self-contained
The memory allocated for the atomic pool needs to have the same mapping attributes that we use for remapping, so use pgprot_dmacoherent instead of open coding it. Also deduct a suitable zone to allocate the memory from based on the presence of the DMA zones. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -80,9 +80,3 @@ void arch_dma_prep_coherent(struct page *page, size_t size)
|
||||
{
|
||||
cache_op(page_to_phys(page), size, cpu_dma_wbinval_range);
|
||||
}
|
||||
|
||||
static int __init atomic_pool_init(void)
|
||||
{
|
||||
return dma_atomic_pool_init(GFP_KERNEL, pgprot_noncached(PAGE_KERNEL));
|
||||
}
|
||||
postcore_initcall(atomic_pool_init);
|
||||
|
Reference in New Issue
Block a user