This is a note to let you know that I've just added the patch titled dmaengine: ioat: Allocate correct size for descriptor chunk to the 5.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: dmaengine-ioat-allocate-correct-size-for-descriptor-.patch and it can be found in the queue-5.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit a7d8de71b0488bf85d0b3945f99a7fb0db49b858 Author: Logan Gunthorpe <logang@xxxxxxxxxxxx> Date: Tue Sep 22 14:08:44 2020 -0600 dmaengine: ioat: Allocate correct size for descriptor chunk [ Upstream commit 028926e4ac8f21af343c25794117fd13c08b1712 ] dma_alloc_coherent() is called with a fixed SZ_2M size, but frees happen with IOAT_CHUNK_SIZE. Recently, IOAT_CHUNK_SIZE was reduced to 512M but the allocation did not change. To fix, change to using the IOAT_CHUNK_SIZE define. This was caught with the upcoming patchset for converting Intel platforms to the dma-iommu implementation. It has a warning when the unmapped size differs from the mapped size. Fixes: a02254f8a676 ("dmaengine: ioat: Decreasing allocation chunk size 2M->512K") Suggested-by: Robin Murphy <robin.murphy@xxxxxxx> Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx> Acked-by: Dave Jiang <dave.jiang@xxxxxxxxx> Cc: Vinod Koul <vkoul@xxxxxxxxxx> Cc: Dave Jiang <dave.jiang@xxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Link: https://lore.kernel.org/intel-gfx/776771a2-247a-d1be-d882-bee02d919ae0@xxxxxxxxxxxx/ Link: https://lore.kernel.org/r/20200922200844.2982-1-logang@xxxxxxxxxxxx Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index fd782aee02d92..98c56606ab1a9 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c @@ -389,7 +389,7 @@ ioat_alloc_ring(struct dma_chan *c, int order, gfp_t flags) struct ioat_descs *descs = &ioat_chan->descs[i]; descs->virt = dma_alloc_coherent(to_dev(ioat_chan), - SZ_2M, &descs->hw, flags); + IOAT_CHUNK_SIZE, &descs->hw, flags); if (!descs->virt) { int idx;