dma-direct: make uncached_kernel_address more general
authorChristoph Hellwig <hch@lst.de>
Fri, 21 Feb 2020 23:55:43 +0000 (15:55 -0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 16 Mar 2020 09:48:09 +0000 (10:48 +0100)
commitfa7e2247c5729f990c7456fe09f3af99c8f2571b
tree65aa46af4ff51a93301caca46b509c34267bfe40
parent3d0fc341c4bb66b2c41c0d1ec954a6d300e100b7
dma-direct: make uncached_kernel_address more general

Rename the symbol to arch_dma_set_uncached, and pass a size to it as
well as allow an error return.  That will allow reusing this hook for
in-place pagetable remapping.

As the in-place remap doesn't always require an explicit cache flush,
also detangle ARCH_HAS_DMA_PREP_COHERENT from ARCH_HAS_DMA_SET_UNCACHED.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
arch/Kconfig
arch/microblaze/Kconfig
arch/microblaze/mm/consistent.c
arch/mips/Kconfig
arch/mips/mm/dma-noncoherent.c
arch/nios2/Kconfig
arch/nios2/mm/dma-mapping.c
arch/xtensa/Kconfig
arch/xtensa/kernel/pci-dma.c
include/linux/dma-noncoherent.h
kernel/dma/direct.c