dma-mapping: add a dma_init_global_coherent helper
authorChristoph Hellwig <hch@lst.de>
Wed, 23 Jun 2021 14:05:05 +0000 (16:05 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 18 Aug 2021 14:24:11 +0000 (16:24 +0200)
commit39a2d3506b2d53c569a6db13d65b2f3728c4feec
treea28837a98a67beafc9ee020795ffc2d8efe0d107
parenta6933571f34a9aee843fff2aa4b96949c57d6274
dma-mapping: add a dma_init_global_coherent helper

Add a new helper to initialize the global coherent pool.  This both
cleans up the existing initialization which indirects through the
reserved_mem_ops that are normally only used for struct device, and
also allows using the global pool for non-devicetree architectures.

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