linux/drivers/dma/ioat
Logan Gunthorpe 028926e4ac dmaengine: ioat: Allocate correct size for descriptor chunk
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: a02254f8a6 ("dmaengine: ioat: Decreasing allocation chunk size 2M->512K")
Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/intel-gfx/776771a2-247a-d1be-d882-bee02d919ae0@deltatee.com/
Link: https://lore.kernel.org/r/20200922200844.2982-1-logang@deltatee.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-10-05 10:16:41 +05:30
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
dca.c dmanegine: ioat/dca: Replace zero-length array with flexible-array member 2020-02-19 17:48:40 +05:30
dma.c dmaengine: ioat: Allocate correct size for descriptor chunk 2020-10-05 10:16:41 +05:30
dma.h dmaengine: ioat: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:06 +05:30
hw.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 7 2019-05-21 11:28:40 +02:00
init.c dmaengine: ioat: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:06 +05:30
prep.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 291 2019-06-05 17:36:38 +02:00
registers.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 7 2019-05-21 11:28:40 +02:00
sysfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 291 2019-06-05 17:36:38 +02:00