diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-01 14:34:33 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-25 07:20:47 +0300 |
commit | efa70f2fdc842e63a0a13223e0e83cedcc2117f1 (patch) | |
tree | ef21550627a0a50be9edf10c53542f9c59a61896 /arch/s390/pci | |
parent | 5a84292271402cffe0717bc58e2ad9a0c7977272 (diff) | |
download | linux-efa70f2fdc842e63a0a13223e0e83cedcc2117f1.tar.xz |
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)
Diffstat (limited to 'arch/s390/pci')
-rw-r--r-- | arch/s390/pci/pci_dma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c index 4a37d8f4de9d..9291023e9469 100644 --- a/arch/s390/pci/pci_dma.c +++ b/arch/s390/pci/pci_dma.c @@ -668,6 +668,8 @@ const struct dma_map_ops s390_pci_dma_ops = { .unmap_page = s390_dma_unmap_pages, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, + .alloc_pages = dma_common_alloc_pages, + .free_pages = dma_common_free_pages, /* dma_supported is unconditionally true without a callback */ }; EXPORT_SYMBOL_GPL(s390_pci_dma_ops); |