powerpc/dma: use the dma_direct mapping routines
Switch the streaming DMA mapping and ownership transfer methods to the functionally identical dma_direct_ versions. Factor the cache maintainance helpers into the form expected by the common code for that. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
committed by
Michael Ellerman
parent
31f940afda
commit
461db2bdbf
@@ -68,7 +68,7 @@ static dma_addr_t dma_iommu_map_page(struct device *dev, struct page *page,
|
||||
unsigned long attrs)
|
||||
{
|
||||
if (dma_iommu_map_bypass(dev, attrs))
|
||||
return dma_nommu_map_page(dev, page, offset, size, direction,
|
||||
return dma_direct_map_page(dev, page, offset, size, direction,
|
||||
attrs);
|
||||
return iommu_map_page(dev, get_iommu_table_base(dev), page, offset,
|
||||
size, device_to_mask(dev), direction, attrs);
|
||||
@@ -90,7 +90,7 @@ static int dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist,
|
||||
unsigned long attrs)
|
||||
{
|
||||
if (dma_iommu_map_bypass(dev, attrs))
|
||||
return dma_nommu_map_sg(dev, sglist, nelems, direction, attrs);
|
||||
return dma_direct_map_sg(dev, sglist, nelems, direction, attrs);
|
||||
return ppc_iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems,
|
||||
device_to_mask(dev), direction, attrs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user