linux-stable/kernel/dma
David Rientjes c84dc6e68a dma-pool: add additional coherent pools to map to gfp mask
The single atomic pool is allocated from the lowest zone possible since
it is guaranteed to be applicable for any DMA allocation.

Devices may allocate through the DMA API but not have a strict reliance
on GFP_DMA memory.  Since the atomic pool will be used for all
non-blockable allocations, returning all memory from ZONE_DMA may
unnecessarily deplete the zone.

Provision for multiple atomic pools that will map to the optimal gfp
mask of the device.

When allocating non-blockable memory, determine the optimal gfp mask of
the device and use the appropriate atomic pool.

The coherent DMA mask will remain the same between allocation and free
and, thus, memory will be freed to the same atomic pool it was allocated
from.

__dma_atomic_pool_init() will be changed to return struct gen_pool *
later once dynamic expansion is added.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2020-04-20 12:09:40 +02:00
..
coherent.c dma-coherent: fix integer overflow in the reserved-memory dma allocation 2020-03-16 10:43:02 +01:00
contiguous.c dma-contiguous: CMA: give precedence to cmdline 2020-01-30 14:41:42 +01:00
debug.c dma-debug: make __dma_entry_alloc_check_leak() static 2020-04-20 12:05:18 +02:00
direct.c dma-pool: add additional coherent pools to map to gfp mask 2020-04-20 12:09:40 +02:00
dummy.c dma-mapping: factor out dummy DMA ops 2018-12-13 21:06:12 +01:00
Kconfig dma-remap: separate DMA atomic pools from direct remap code 2020-04-20 12:08:45 +02:00
Makefile dma-remap: separate DMA atomic pools from direct remap code 2020-04-20 12:08:45 +02:00
mapping.c dma-mapping: Fix dma_pgprot() for unencrypted coherent pages 2020-03-17 11:52:58 +01:00
pool.c dma-pool: add additional coherent pools to map to gfp mask 2020-04-20 12:09:40 +02:00
remap.c dma-remap: separate DMA atomic pools from direct remap code 2020-04-20 12:08:45 +02:00
swiotlb.c dma-direct: improve swiotlb error reporting 2020-02-05 18:53:05 +01:00
virt.c dma-mapping: zero memory returned from dma_alloc_* 2018-12-20 08:13:52 +01:00