diff options
author | Christoph Hellwig <hch@lst.de> | 2019-02-13 08:01:28 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-02-18 22:41:04 +1100 |
commit | 31f940afda6add7a7bb182adde97e615e5355c6d (patch) | |
tree | 0133b5ca9bc0889985dc3c4021fa3268e97ae6ea /arch/powerpc/kernel/dma-iommu.c | |
parent | feee96440c9c5fdf47f8c8079c104fc8082924a0 (diff) | |
download | linux-31f940afda6add7a7bb182adde97e615e5355c6d.tar.bz2 |
powerpc/dma: use the dma-direct allocator for coherent platforms
The generic code allows a few nice things such as node local allocations
and dipping into the CMA area. The lookup of the right zone for a given
dma mask works a little different, but the results should be the same.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/dma-iommu.c')
-rw-r--r-- | arch/powerpc/kernel/dma-iommu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index 67fbfaa4e3b2..c75ba4e3a50c 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c @@ -40,8 +40,7 @@ static void *dma_iommu_alloc_coherent(struct device *dev, size_t size, unsigned long attrs) { if (dma_iommu_alloc_bypass(dev)) - return __dma_nommu_alloc_coherent(dev, size, dma_handle, flag, - attrs); + return dma_direct_alloc(dev, size, dma_handle, flag, attrs); return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size, dma_handle, dev->coherent_dma_mask, flag, dev_to_node(dev)); @@ -52,7 +51,7 @@ static void dma_iommu_free_coherent(struct device *dev, size_t size, unsigned long attrs) { if (dma_iommu_alloc_bypass(dev)) - __dma_nommu_free_coherent(dev, size, vaddr, dma_handle, attrs); + dma_direct_free(dev, size, vaddr, dma_handle, attrs); else iommu_free_coherent(get_iommu_table_base(dev), size, vaddr, dma_handle); |