+17
−0
+10
−0
+44
−12
+41
−0
Loading
mainline inclusion from mainline-v6.9-rc1 commit f4111e39 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9CC0X Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f4111e39a52aa5d5136d890bbd1aa87c1c8fe3bc -------------------------------- [ Upstream commit f4111e39 ] Add the functions, swiotlb_{alloc,free} and is_swiotlb_for_alloc to support the memory allocation from restricted DMA pool. The restricted DMA pool is preferred if available. Note that since coherent allocation needs remapping, one must set up another device coherent pool by shared-dma-pool and use dma_alloc_from_dev_coherent instead for atomic coherent allocation. Signed-off-by:Claire Chang <tientzu@chromium.org> Reviewed-by:
Christoph Hellwig <hch@lst.de> Tested-by:
Stefano Stabellini <sstabellini@kernel.org> Tested-by:
Will Deacon <will@kernel.org> Acked-by:
Stefano Stabellini <sstabellini@kernel.org> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Conflicts: include/linux/swiotlb.h kernel/dma/swiotlb.c [hejingxian: delete modify for struct io_tlb_mem which not exist in OLK5.10] [hejingxian: modify per dev dma_io_tlb_mem start to io_tlb_start] [hejingxian: add define for swiotlb_release_slots and swiotlb_find_slots] [hejingxian: move is_swiotlb_for_alloc into direct.c and return false] Signed-off-by:
Jingxian He <hejingxian@huawei.com>