powerpc/dma: implement new dma_*map*_attrs() interfaces
Update powerpc to use the new dma_*map*_attrs() interfaces. In doing so update struct dma_mapping_ops to accept a struct dma_attrs and propagate these changes through to all users of the code (generic IOMMU and the 64bit DMA code, and the iseries and ps3 platform code). The old dma_*map_*() interfaces are reimplemented as calls to the corresponding new interfaces. Signed-off-by: Mark Nelson <markn@au1.ibm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
c8692362db
commit
3affedc4e1
@@ -555,7 +555,7 @@ static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
|
||||
*/
|
||||
|
||||
static dma_addr_t ps3_sb_map_single(struct device *_dev, void *ptr, size_t size,
|
||||
enum dma_data_direction direction)
|
||||
enum dma_data_direction direction, struct dma_attrs *attrs)
|
||||
{
|
||||
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
|
||||
int result;
|
||||
@@ -575,7 +575,8 @@ static dma_addr_t ps3_sb_map_single(struct device *_dev, void *ptr, size_t size,
|
||||
|
||||
static dma_addr_t ps3_ioc0_map_single(struct device *_dev, void *ptr,
|
||||
size_t size,
|
||||
enum dma_data_direction direction)
|
||||
enum dma_data_direction direction,
|
||||
struct dma_attrs *attrs)
|
||||
{
|
||||
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
|
||||
int result;
|
||||
@@ -608,7 +609,7 @@ static dma_addr_t ps3_ioc0_map_single(struct device *_dev, void *ptr,
|
||||
}
|
||||
|
||||
static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
|
||||
size_t size, enum dma_data_direction direction)
|
||||
size_t size, enum dma_data_direction direction, struct dma_attrs *attrs)
|
||||
{
|
||||
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
|
||||
int result;
|
||||
@@ -622,7 +623,7 @@ static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
|
||||
}
|
||||
|
||||
static int ps3_sb_map_sg(struct device *_dev, struct scatterlist *sgl,
|
||||
int nents, enum dma_data_direction direction)
|
||||
int nents, enum dma_data_direction direction, struct dma_attrs *attrs)
|
||||
{
|
||||
#if defined(CONFIG_PS3_DYNAMIC_DMA)
|
||||
BUG_ON("do");
|
||||
@@ -651,14 +652,15 @@ static int ps3_sb_map_sg(struct device *_dev, struct scatterlist *sgl,
|
||||
|
||||
static int ps3_ioc0_map_sg(struct device *_dev, struct scatterlist *sg,
|
||||
int nents,
|
||||
enum dma_data_direction direction)
|
||||
enum dma_data_direction direction,
|
||||
struct dma_attrs *attrs)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction direction)
|
||||
int nents, enum dma_data_direction direction, struct dma_attrs *attrs)
|
||||
{
|
||||
#if defined(CONFIG_PS3_DYNAMIC_DMA)
|
||||
BUG_ON("do");
|
||||
@@ -666,7 +668,8 @@ static void ps3_sb_unmap_sg(struct device *_dev, struct scatterlist *sg,
|
||||
}
|
||||
|
||||
static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,
|
||||
int nents, enum dma_data_direction direction)
|
||||
int nents, enum dma_data_direction direction,
|
||||
struct dma_attrs *attrs)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
Reference in New Issue
Block a user