OSDN Git Service

dma-direct: improve swiotlb error reporting
authorChristoph Hellwig <hch@lst.de>
Mon, 3 Feb 2020 13:44:38 +0000 (14:44 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 5 Feb 2020 17:53:05 +0000 (18:53 +0100)
commit4a47cbae04844f0c5e2365aa6c217b61850bb832
tree4ee380c5b7c96f872ee8c9eda32f63297793262d
parent91ef26f914171cf753330f13724fd9142b5b1640
dma-direct: improve swiotlb error reporting

Untangle the way how dma_direct_map_page calls into swiotlb to be able
to properly report errors where the swiotlb DMA address overflows the
mask separately from overflows in the !swiotlb case.  This means that
siotlb_map now has to do a little more work that duplicates
dma_direct_map_page, but doing so greatly simplifies the calling
convention.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
include/linux/swiotlb.h
kernel/dma/direct.c
kernel/dma/swiotlb.c