mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-04-01 11:54:10 +00:00
powerpc/iommu: Rename iommu_[un]map_sg functions
The IOMMU-API gained support for a new iommu_map_sg function. This causes compile failures on powerpc because the function name is already globally used there. This patch renames adds a ppc_ prefix to these functions to solve the compile problem. Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
d7da6bdc32
commit
0690cbd2e5
4 changed files with 27 additions and 23 deletions
|
@ -137,12 +137,15 @@ static inline void set_iommu_table_base_and_group(struct device *dev,
|
||||||
iommu_add_device(dev);
|
iommu_add_device(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
extern int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
||||||
struct scatterlist *sglist, int nelems,
|
struct scatterlist *sglist, int nelems,
|
||||||
unsigned long mask, enum dma_data_direction direction,
|
unsigned long mask,
|
||||||
|
enum dma_data_direction direction,
|
||||||
struct dma_attrs *attrs);
|
struct dma_attrs *attrs);
|
||||||
extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
|
extern void ppc_iommu_unmap_sg(struct iommu_table *tbl,
|
||||||
int nelems, enum dma_data_direction direction,
|
struct scatterlist *sglist,
|
||||||
|
int nelems,
|
||||||
|
enum dma_data_direction direction,
|
||||||
struct dma_attrs *attrs);
|
struct dma_attrs *attrs);
|
||||||
|
|
||||||
extern void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
|
extern void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
|
||||||
|
|
|
@ -60,7 +60,7 @@ static int dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist,
|
||||||
int nelems, enum dma_data_direction direction,
|
int nelems, enum dma_data_direction direction,
|
||||||
struct dma_attrs *attrs)
|
struct dma_attrs *attrs)
|
||||||
{
|
{
|
||||||
return iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems,
|
return ppc_iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems,
|
||||||
device_to_mask(dev), direction, attrs);
|
device_to_mask(dev), direction, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@ static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist,
|
||||||
int nelems, enum dma_data_direction direction,
|
int nelems, enum dma_data_direction direction,
|
||||||
struct dma_attrs *attrs)
|
struct dma_attrs *attrs)
|
||||||
{
|
{
|
||||||
iommu_unmap_sg(get_iommu_table_base(dev), sglist, nelems, direction,
|
ppc_iommu_unmap_sg(get_iommu_table_base(dev), sglist, nelems,
|
||||||
attrs);
|
direction, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We support DMA to/from any memory page via the iommu */
|
/* We support DMA to/from any memory page via the iommu */
|
||||||
|
|
|
@ -428,7 +428,7 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
|
||||||
ppc_md.tce_flush(tbl);
|
ppc_md.tce_flush(tbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
||||||
struct scatterlist *sglist, int nelems,
|
struct scatterlist *sglist, int nelems,
|
||||||
unsigned long mask, enum dma_data_direction direction,
|
unsigned long mask, enum dma_data_direction direction,
|
||||||
struct dma_attrs *attrs)
|
struct dma_attrs *attrs)
|
||||||
|
@ -539,7 +539,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
||||||
|
|
||||||
DBG("mapped %d elements:\n", outcount);
|
DBG("mapped %d elements:\n", outcount);
|
||||||
|
|
||||||
/* For the sake of iommu_unmap_sg, we clear out the length in the
|
/* For the sake of ppc_iommu_unmap_sg, we clear out the length in the
|
||||||
* next entry of the sglist if we didn't fill the list completely
|
* next entry of the sglist if we didn't fill the list completely
|
||||||
*/
|
*/
|
||||||
if (outcount < incount) {
|
if (outcount < incount) {
|
||||||
|
@ -572,7 +572,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
|
void ppc_iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
|
||||||
int nelems, enum dma_data_direction direction,
|
int nelems, enum dma_data_direction direction,
|
||||||
struct dma_attrs *attrs)
|
struct dma_attrs *attrs)
|
||||||
{
|
{
|
||||||
|
|
|
@ -621,8 +621,9 @@ static int dma_fixed_map_sg(struct device *dev, struct scatterlist *sg,
|
||||||
if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
|
if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
|
||||||
return dma_direct_ops.map_sg(dev, sg, nents, direction, attrs);
|
return dma_direct_ops.map_sg(dev, sg, nents, direction, attrs);
|
||||||
else
|
else
|
||||||
return iommu_map_sg(dev, cell_get_iommu_table(dev), sg, nents,
|
return ppc_iommu_map_sg(dev, cell_get_iommu_table(dev), sg,
|
||||||
device_to_mask(dev), direction, attrs);
|
nents, device_to_mask(dev),
|
||||||
|
direction, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
|
static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
|
||||||
|
@ -632,8 +633,8 @@ static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
|
||||||
if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
|
if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
|
||||||
dma_direct_ops.unmap_sg(dev, sg, nents, direction, attrs);
|
dma_direct_ops.unmap_sg(dev, sg, nents, direction, attrs);
|
||||||
else
|
else
|
||||||
iommu_unmap_sg(cell_get_iommu_table(dev), sg, nents, direction,
|
ppc_iommu_unmap_sg(cell_get_iommu_table(dev), sg, nents,
|
||||||
attrs);
|
direction, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dma_fixed_dma_supported(struct device *dev, u64 mask)
|
static int dma_fixed_dma_supported(struct device *dev, u64 mask)
|
||||||
|
|
Loading…
Add table
Reference in a new issue