Commit 9b51f044 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'parisc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull another parisc update from Helge Deller:
 "Christoph Hellwig provided one patch for the parisc architecture to
  drop the DMA_ERROR_CODE define from the parisc architecture"

* 'parisc-4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: ->mapping_error
parents 55a7b212 227145eb
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
** flush/purge and allocate "regular" cacheable pages for everything. ** flush/purge and allocate "regular" cacheable pages for everything.
*/ */
#define DMA_ERROR_CODE (~(dma_addr_t)0)
#ifdef CONFIG_PA11 #ifdef CONFIG_PA11
extern const struct dma_map_ops pcxl_dma_ops; extern const struct dma_map_ops pcxl_dma_ops;
extern const struct dma_map_ops pcx_dma_ops; extern const struct dma_map_ops pcx_dma_ops;
......
...@@ -110,6 +110,8 @@ ...@@ -110,6 +110,8 @@
#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];
...@@ -742,7 +744,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size, ...@@ -742,7 +744,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 DMA_ERROR_CODE; return CCIO_MAPPING_ERROR;
BUG_ON(size <= 0); BUG_ON(size <= 0);
...@@ -1023,6 +1025,11 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -1023,6 +1025,11 @@ 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,
...@@ -1031,6 +1038,7 @@ static const struct dma_map_ops ccio_ops = { ...@@ -1031,6 +1038,7 @@ 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
......
...@@ -93,6 +93,8 @@ ...@@ -93,6 +93,8 @@
#define DEFAULT_DMA_HINT_REG 0 #define DEFAULT_DMA_HINT_REG 0
#define SBA_MAPPING_ERROR (~(dma_addr_t)0)
struct sba_device *sba_list; struct sba_device *sba_list;
EXPORT_SYMBOL_GPL(sba_list); EXPORT_SYMBOL_GPL(sba_list);
...@@ -725,7 +727,7 @@ sba_map_single(struct device *dev, void *addr, size_t size, ...@@ -725,7 +727,7 @@ sba_map_single(struct device *dev, void *addr, size_t size,
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
if (!ioc) if (!ioc)
return DMA_ERROR_CODE; return SBA_MAPPING_ERROR;
/* save offset bits */ /* save offset bits */
offset = ((dma_addr_t) (long) addr) & ~IOVP_MASK; offset = ((dma_addr_t) (long) addr) & ~IOVP_MASK;
...@@ -1083,6 +1085,11 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -1083,6 +1085,11 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
} }
static int sba_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
return dma_addr == SBA_MAPPING_ERROR;
}
static const struct dma_map_ops sba_ops = { static const struct dma_map_ops sba_ops = {
.dma_supported = sba_dma_supported, .dma_supported = sba_dma_supported,
.alloc = sba_alloc, .alloc = sba_alloc,
...@@ -1091,6 +1098,7 @@ static const struct dma_map_ops sba_ops = { ...@@ -1091,6 +1098,7 @@ static const struct dma_map_ops sba_ops = {
.unmap_page = sba_unmap_page, .unmap_page = sba_unmap_page,
.map_sg = sba_map_sg, .map_sg = sba_map_sg,
.unmap_sg = sba_unmap_sg, .unmap_sg = sba_unmap_sg,
.mapping_error = sba_mapping_error,
}; };
......
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