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>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user