dma-mapping: allow using the global coherent pool for !ARM
authorChristoph Hellwig <hch@lst.de>
Thu, 24 Jun 2021 17:38:19 +0000 (19:38 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 18 Aug 2021 14:24:10 +0000 (16:24 +0200)
Switch an ifdef so that the global coherent pool is initialized for
any architecture that selects the DMA_GLOBAL_POOL symbol insted of
hardcoding ARM.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Dillon Min <dillon.minfei@gmail.com>
kernel/dma/coherent.c

index 794e76b..67b126a 100644 (file)
@@ -361,7 +361,9 @@ static int __init rmem_dma_setup(struct reserved_mem *rmem)
                pr_err("Reserved memory: regions without no-map are not yet supported\n");
                return -EINVAL;
        }
+#endif
 
+#ifdef CONFIG_DMA_GLOBAL_POOL
        if (of_get_flat_dt_prop(node, "linux,dma-default", NULL)) {
                WARN(dma_reserved_default_memory,
                     "Reserved memory: region for default DMA coherent area is redefined\n");