aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h5
-rw-r--r--arch/powerpc/kernel/dma-swiotlb.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index 91217e4a0bfc..4bd41b4051e3 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -143,6 +143,11 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
143 143
144static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 144static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
145{ 145{
146 struct dma_map_ops *dma_ops = get_dma_ops(dev);
147
148 if (dma_ops->mapping_error)
149 return dma_ops->mapping_error(dev, dma_addr);
150
146#ifdef CONFIG_PPC64 151#ifdef CONFIG_PPC64
147 return (dma_addr == DMA_ERROR_CODE); 152 return (dma_addr == DMA_ERROR_CODE);
148#else 153#else
diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c
index d1143a68d82a..e96cbbd9b449 100644
--- a/arch/powerpc/kernel/dma-swiotlb.c
+++ b/arch/powerpc/kernel/dma-swiotlb.c
@@ -42,7 +42,8 @@ struct dma_map_ops swiotlb_dma_ops = {
42 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, 42 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
43 .sync_single_range_for_device = swiotlb_sync_single_range_for_device, 43 .sync_single_range_for_device = swiotlb_sync_single_range_for_device,
44 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu, 44 .sync_sg_for_cpu = swiotlb_sync_sg_for_cpu,
45 .sync_sg_for_device = swiotlb_sync_sg_for_device 45 .sync_sg_for_device = swiotlb_sync_sg_for_device,
46 .mapping_error = swiotlb_dma_mapping_error,
46}; 47};
47 48
48void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev) 49void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev)