Messages in this thread Patch in this message | | | From | Christoph Hellwig <> | Subject | [PATCH] arm: initialize the dma-remap atomic pool for LPAE configs | Date | Mon, 5 Aug 2019 10:56:37 +0300 |
| |
When we use the generic dma-direct + remap code we also need to initialize the atomic pool that is used for GFP_ATOMIC allocations on non-coherent devices.
Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs") Signed-off-by: Christoph Hellwig <hch@lst.de> --- arch/arm/mm/dma-mapping.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 6774b03aa405..e509365cc9ca 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -2423,4 +2423,10 @@ void arch_dma_free(struct device *dev, size_t size, void *cpu_addr, { __arm_dma_free(dev, size, cpu_addr, dma_handle, attrs, false); } + +static int __init atomic_pool_init(void) +{ + return dma_atomic_pool_init(GFP_DMA, pgprot_noncached(PAGE_KERNEL)); +} +postcore_initcall(atomic_pool_init); #endif /* CONFIG_SWIOTLB */ -- 2.20.1
| |