mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]>
This commit is contained in:
parent
419e2f1838
commit
8e3a68fb55
6 changed files with 14 additions and 28 deletions
|
|
@ -104,9 +104,3 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
|||
dev_info(dev, "use %sncoherent DMA ops\n",
|
||||
dev->dma_coherent ? "" : "non");
|
||||
}
|
||||
|
||||
static int __init atomic_pool_init(void)
|
||||
{
|
||||
return dma_atomic_pool_init(GFP_KERNEL, pgprot_noncached(PAGE_KERNEL));
|
||||
}
|
||||
postcore_initcall(atomic_pool_init);
|
||||
|
|
|
|||
Loading…
Reference in a new issue