dma-mapping: add a new dma_alloc_pages API
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Sep 2020 11:34:33 +0000 (13:34 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 Sep 2020 04:20:47 +0000 (06:20 +0200)
commitefa70f2fdc842e63a0a13223e0e83cedcc2117f1
treeef21550627a0a50be9edf10c53542f9c59a61896
parent5a84292271402cffe0717bc58e2ad9a0c7977272
dma-mapping: add a new dma_alloc_pages API

This API is the equivalent of alloc_pages, except that the returned memory
is guaranteed to be DMA addressable by the passed in device.  The
implementation will also be used to provide a more sensible replacement
for DMA_ATTR_NON_CONSISTENT flag.

Additionally dma_alloc_noncoherent is switched over to use dma_alloc_pages
as its backend.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> (MIPS part)
23 files changed:
Documentation/core-api/dma-attributes.rst
arch/alpha/kernel/pci_iommu.c
arch/arm/mm/dma-mapping-nommu.c
arch/arm/mm/dma-mapping.c
arch/ia64/hp/common/sba_iommu.c
arch/mips/jazz/jazzdma.c
arch/powerpc/kernel/dma-iommu.c
arch/powerpc/platforms/ps3/system-bus.c
arch/powerpc/platforms/pseries/vio.c
arch/s390/pci/pci_dma.c
arch/x86/kernel/amd_gart_64.c
drivers/iommu/dma-iommu.c
drivers/iommu/intel/iommu.c
drivers/parisc/ccio-dma.c
drivers/parisc/sba_iommu.c
drivers/xen/swiotlb-xen.c
include/linux/dma-direct.h
include/linux/dma-mapping.h
include/linux/dma-noncoherent.h
kernel/dma/direct.c
kernel/dma/mapping.c
kernel/dma/ops_helpers.c
kernel/dma/virt.c