summaryrefslogtreecommitdiff
path: root/kernel/dma/coherent.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-06-24 19:38:19 +0200
committerChristoph Hellwig <hch@lst.de>2021-08-18 16:24:10 +0200
commit70d6aa0ecfed253a2b14659a6c77359af6d9b3ee (patch)
treed1fab7c1abf6f9ac044e9e852889bd0f12e0910c /kernel/dma/coherent.c
parent31b089bbc15a53ca7c90c77ef51390d87f612088 (diff)
dma-mapping: allow using the global coherent pool for !ARM
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>
Diffstat (limited to 'kernel/dma/coherent.c')
-rw-r--r--kernel/dma/coherent.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/dma/coherent.c b/kernel/dma/coherent.c
index 794e76b03b34..67b126afac5a 100644
--- a/kernel/dma/coherent.c
+++ b/kernel/dma/coherent.c
@@ -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");