[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190805075637.5373-2-hch@lst.de>
Date: Mon, 5 Aug 2019 10:56:37 +0300
From: Christoph Hellwig <hch@....de>
To: Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc: Roger Quadros <rogerq@...com>,
Vignesh Raghavendra <vigneshr@...com>,
linux-arm-kernel@...ts.infradead.org,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: [PATCH] arm: initialize the dma-remap atomic pool for LPAE configs
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@....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
Powered by blists - more mailing lists