diff options
author | Christoph Hellwig <hch@lst.de> | 2021-06-23 14:21:16 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-08-18 16:24:09 +0200 |
commit | faf4ef823ac5f3b6a34a73b76c52895dee3dce55 (patch) | |
tree | 81396c9f70e4d8b35b9be650a427c86ff1dc3433 /kernel/dma/Kconfig | |
parent | dma-mapping: return an unsigned int from dma_map_sg{,_attrs} (diff) | |
download | linux-faf4ef823ac5f3b6a34a73b76c52895dee3dce55.tar.xz linux-faf4ef823ac5f3b6a34a73b76c52895dee3dce55.zip |
dma-direct: add support for dma_coherent_default_memory
Add an option to allocate uncached memory for dma_alloc_coherent from
the global dma_coherent_default_memory. This will allow to move
arm-nommu (and eventually other platforms) to use generic code for
allocating uncached memory from a pre-populated pool.
Note that this is a different pool from the one that platforms that
can remap at runtime use for GFP_ATOMIC allocations for now, although
there might be opportunities to eventually end up with a common codebase
for the two use cases.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Dillon Min <dillon.minfei@gmail.com>
Diffstat (limited to 'kernel/dma/Kconfig')
-rw-r--r-- | kernel/dma/Kconfig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 77b405508743..725cfd51762b 100644 --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig @@ -93,6 +93,10 @@ config DMA_COHERENT_POOL select GENERIC_ALLOCATOR bool +config DMA_GLOBAL_POOL + select DMA_DECLARE_COHERENT + bool + config DMA_REMAP bool depends on MMU |