Merge tag 'dma-mapping-4.20-3' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fixes from Christoph Hellwig:
"Two dma-direct / swiotlb regressions fixes:

- zero is a valid physical address on some arm boards, we can't use
it as the error value

- don't try to cache flush the error return value (no matter what it
is)"

* tag 'dma-mapping-4.20-3' of git://git.infradead.org/users/hch/dma-mapping:
swiotlb: Skip cache maintenance on map error
dma-direct: Make DIRECT_MAPPING_ERROR viable for SWIOTLB

Changed files
+3 -2
include
linux
kernel
dma
+1 -1
include/linux/dma-direct.h
··· 5 5 #include <linux/dma-mapping.h> 6 6 #include <linux/mem_encrypt.h> 7 7 8 - #define DIRECT_MAPPING_ERROR 0 8 + #define DIRECT_MAPPING_ERROR (~(dma_addr_t)0) 9 9 10 10 #ifdef CONFIG_ARCH_HAS_PHYS_TO_DMA 11 11 #include <asm/dma-direct.h>
+2 -1
kernel/dma/swiotlb.c
··· 679 679 } 680 680 681 681 if (!dev_is_dma_coherent(dev) && 682 - (attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) 682 + (attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0 && 683 + dev_addr != DIRECT_MAPPING_ERROR) 683 684 arch_sync_dma_for_device(dev, phys, size, dir); 684 685 685 686 return dev_addr;