]> git.baikalelectronics.ru Git - kernel.git/commit
dma-debug: check scatterlist segments
authorRobin Murphy <robin.murphy@arm.com>
Mon, 21 May 2018 11:35:13 +0000 (12:35 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 24 May 2018 07:24:17 +0000 (09:24 +0200)
commit21294d1e522b9fa2eb48bb8551eb9b8f1a1bab3f
tree43665ea5d3d05e734ea6a1399e7e5fdfd06b7792
parent1895cdd6d08560fbcc355ea953e8902f753cf99e
dma-debug: check scatterlist segments

Drivers/subsystems creating scatterlists for DMA should be taking care
to respect the scatter-gather limitations of the appropriate device, as
described by dma_parms. A DMA API implementation cannot feasibly split
a scatterlist into *more* entries than originally passed, so it is not
well defined what they should do when given a segment larger than the
limit they are also required to respect.

Conversely, devices which are less limited than the rather conservative
defaults, or indeed have no limitations at all (e.g. GPUs with their own
internal MMU), should be encouraged to set appropriate dma_parms, as
they may get more efficient DMA mapping performance out of it.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
lib/Kconfig.debug
lib/dma-debug.c