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>
这个提交包含在:
Christoph Hellwig
2019-08-03 12:42:15 +03:00
父节点 419e2f1838
当前提交 8e3a68fb55
修改 6 个文件,包含 14 行新增28 行删除

查看文件

@@ -14,12 +14,6 @@
#include <linux/version.h>
#include <asm/cache.h>
static int __init atomic_pool_init(void)
{
return dma_atomic_pool_init(GFP_KERNEL, pgprot_noncached(PAGE_KERNEL));
}
postcore_initcall(atomic_pool_init);
void arch_dma_prep_coherent(struct page *page, size_t size)
{
if (PageHighMem(page)) {