diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-21 15:17:10 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-06-28 16:54:33 +0300 |
commit | 6009faa43f804c99b3d8fff94fa1e0692be70358 (patch) | |
tree | 05168471d1bc2b5d056a7e77bdc1bfd8ff844eb2 /arch/powerpc/include/asm/iommu.h | |
parent | ceaf481c4f6ae6090288528825abc7d051bb1032 (diff) | |
download | linux-6009faa43f804c99b3d8fff94fa1e0692be70358.tar.xz |
powerpc: implement ->mapping_error
DMA_ERROR_CODE is going to go away, so don't rely on it. Instead
define a ->mapping_error method for all IOMMU based dma operation
instances. The direct ops don't ever return an error and don't
need a ->mapping_error method.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/iommu.h')
-rw-r--r-- | arch/powerpc/include/asm/iommu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h index 8a8ce220d7d0..20febe0b7f32 100644 --- a/arch/powerpc/include/asm/iommu.h +++ b/arch/powerpc/include/asm/iommu.h @@ -139,6 +139,8 @@ struct scatterlist; #ifdef CONFIG_PPC64 +#define IOMMU_MAPPING_ERROR (~(dma_addr_t)0x0) + static inline void set_iommu_table_base(struct device *dev, struct iommu_table *base) { @@ -238,6 +240,8 @@ static inline int __init tce_iommu_bus_notifier_init(void) } #endif /* !CONFIG_IOMMU_API */ +int dma_iommu_mapping_error(struct device *dev, dma_addr_t dma_addr); + #else static inline void *get_iommu_table_base(struct device *dev) |