SPARC: adapt for dma_map_ops changes
Adapt core SPARC architecture code for dma_map_ops changes: replace alloc/free_coherent with generic alloc/free methods. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Acked-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
Marek Szyprowski

parent
bfbf7d6151
commit
c416258a6e
@@ -261,7 +261,8 @@ EXPORT_SYMBOL(sbus_set_sbus64);
|
||||
* CPU may access them without any explicit flushing.
|
||||
*/
|
||||
static void *sbus_alloc_coherent(struct device *dev, size_t len,
|
||||
dma_addr_t *dma_addrp, gfp_t gfp)
|
||||
dma_addr_t *dma_addrp, gfp_t gfp,
|
||||
struct dma_attrs *attrs)
|
||||
{
|
||||
struct platform_device *op = to_platform_device(dev);
|
||||
unsigned long len_total = PAGE_ALIGN(len);
|
||||
@@ -315,7 +316,7 @@ err_nopages:
|
||||
}
|
||||
|
||||
static void sbus_free_coherent(struct device *dev, size_t n, void *p,
|
||||
dma_addr_t ba)
|
||||
dma_addr_t ba, struct dma_attrs *attrs)
|
||||
{
|
||||
struct resource *res;
|
||||
struct page *pgv;
|
||||
@@ -407,8 +408,8 @@ static void sbus_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
|
||||
}
|
||||
|
||||
struct dma_map_ops sbus_dma_ops = {
|
||||
.alloc_coherent = sbus_alloc_coherent,
|
||||
.free_coherent = sbus_free_coherent,
|
||||
.alloc = sbus_alloc_coherent,
|
||||
.free = sbus_free_coherent,
|
||||
.map_page = sbus_map_page,
|
||||
.unmap_page = sbus_unmap_page,
|
||||
.map_sg = sbus_map_sg,
|
||||
@@ -436,7 +437,8 @@ arch_initcall(sparc_register_ioport);
|
||||
* hwdev should be valid struct pci_dev pointer for PCI devices.
|
||||
*/
|
||||
static void *pci32_alloc_coherent(struct device *dev, size_t len,
|
||||
dma_addr_t *pba, gfp_t gfp)
|
||||
dma_addr_t *pba, gfp_t gfp,
|
||||
struct dma_attrs *attrs)
|
||||
{
|
||||
unsigned long len_total = PAGE_ALIGN(len);
|
||||
void *va;
|
||||
@@ -489,7 +491,7 @@ err_nopages:
|
||||
* past this call are illegal.
|
||||
*/
|
||||
static void pci32_free_coherent(struct device *dev, size_t n, void *p,
|
||||
dma_addr_t ba)
|
||||
dma_addr_t ba, struct dma_attrs *attrs)
|
||||
{
|
||||
struct resource *res;
|
||||
|
||||
@@ -645,8 +647,8 @@ static void pci32_sync_sg_for_device(struct device *device, struct scatterlist *
|
||||
}
|
||||
|
||||
struct dma_map_ops pci32_dma_ops = {
|
||||
.alloc_coherent = pci32_alloc_coherent,
|
||||
.free_coherent = pci32_free_coherent,
|
||||
.alloc = pci32_alloc_coherent,
|
||||
.free = pci32_free_coherent,
|
||||
.map_page = pci32_map_page,
|
||||
.unmap_page = pci32_unmap_page,
|
||||
.map_sg = pci32_map_sg,
|
||||
|
Reference in New Issue
Block a user