arm swiotlb fix
Hi all,
my commit to add swiotlb to arm failed to initialize the atomic pool, which is needed for GFP_ATOMIC allocations on non-coherent devices. These are fairly rare, but exist so we should wire it up. For 5.4 I plan to move the initilization to the common dma-remap code so it won't be missed for other architectures.
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
PATCH 1/1 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 <[email protected]>
--- arch/arm/mm/dma-mapping.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mm/dma-mapping.c +6 -0
@@ -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 */
Signature · 6 lines
2.20.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu