Commit 748c3c4d authored by Christoph Hellwig's avatar Christoph Hellwig

parisc/ccio: remove the mapping_error dma_map_ops method

The CCIO iommu code already returns (~(dma_addr_t)0x0) on mapping
failures, so we can switch over to returning DMA_MAPPING_ERROR and let
the core dma-mapping code handle the rest.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 06301c5e
...@@ -110,8 +110,6 @@ ...@@ -110,8 +110,6 @@
#define CMD_TLB_DIRECT_WRITE 35 /* IO_COMMAND for I/O TLB Writes */ #define CMD_TLB_DIRECT_WRITE 35 /* IO_COMMAND for I/O TLB Writes */
#define CMD_TLB_PURGE 33 /* IO_COMMAND to Purge I/O TLB entry */ #define CMD_TLB_PURGE 33 /* IO_COMMAND to Purge I/O TLB entry */
#define CCIO_MAPPING_ERROR (~(dma_addr_t)0)
struct ioa_registers { struct ioa_registers {
/* Runway Supervisory Set */ /* Runway Supervisory Set */
int32_t unused1[12]; int32_t unused1[12];
...@@ -740,7 +738,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size, ...@@ -740,7 +738,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size,
BUG_ON(!dev); BUG_ON(!dev);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
if (!ioc) if (!ioc)
return CCIO_MAPPING_ERROR; return DMA_MAPPING_ERROR;
BUG_ON(size <= 0); BUG_ON(size <= 0);
...@@ -1021,11 +1019,6 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -1021,11 +1019,6 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents); DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents);
} }
static int ccio_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
return dma_addr == CCIO_MAPPING_ERROR;
}
static const struct dma_map_ops ccio_ops = { static const struct dma_map_ops ccio_ops = {
.dma_supported = ccio_dma_supported, .dma_supported = ccio_dma_supported,
.alloc = ccio_alloc, .alloc = ccio_alloc,
...@@ -1034,7 +1027,6 @@ static const struct dma_map_ops ccio_ops = { ...@@ -1034,7 +1027,6 @@ static const struct dma_map_ops ccio_ops = {
.unmap_page = ccio_unmap_page, .unmap_page = ccio_unmap_page,
.map_sg = ccio_map_sg, .map_sg = ccio_map_sg,
.unmap_sg = ccio_unmap_sg, .unmap_sg = ccio_unmap_sg,
.mapping_error = ccio_mapping_error,
}; };
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment