Skip to contentSkip to conversation

: Allow plat_map_dma_mem_page to take a 'size' argument

PATCH New Kumba 1 participant 1 message Jul 23, 2007 MIPS

lore
Share & tools
lore

Kumba

author
#0 lore raw

PATCH 1/1 : Allow plat_map_dma_mem_page to take a 'size' argument

This patch enables the plat_map_dma_mem_page function to take a 'size' argument for use by machines if needed (IP30 support will need this available).

 arch/mips/mm/dma-default.c                    |    2 +-
 arch/mips/pci/pci-dac.c                       |    2 +-
 include/asm-mips/mach-generic/dma-coherence.h |    2 +-
 include/asm-mips/mach-ip27/dma-coherence.h    |    3 ++-
 include/asm-mips/mach-ip32/dma-coherence.h    |    3 ++-
 include/asm-mips/mach-jazz/dma-coherence.h    |    3 ++-
 6 files changed, 9 insertions(+), 6 deletions(-)
arch/mips/mm/dma-default.c +1 -1
diff -Naurp linux-2.6.22.1-20070712.old/arch/mips/mm/dma-default.c linux-2.6.22.1-20070712.size/arch/mips/mm/dma-default.c
@@ -190,7 +190,7 @@ dma_addr_t dma_map_page(struct device *d
 		dma_cache_wback_inv(addr, size);
 	}
 
-	return plat_map_dma_mem_page(dev, page) + offset;
+	return plat_map_dma_mem_page(dev, page, size) + offset;
 }
 
 EXPORT_SYMBOL(dma_map_page);
arch/mips/pci/pci-dac.c +1 -1
diff -Naurp linux-2.6.22.1-20070712.old/arch/mips/pci/pci-dac.c linux-2.6.22.1-20070712.size/arch/mips/pci/pci-dac.c
@@ -35,7 +35,7 @@ dma64_addr_t pci_dac_page_to_dma(struct
 		dma_cache_wback_inv(addr, PAGE_SIZE);
 	}
 
-	return plat_map_dma_mem_page(dev, page) + offset;
+	return plat_map_dma_mem_page(dev, page, PAGE_SIZE) + offset;
 }
 
 EXPORT_SYMBOL(pci_dac_page_to_dma);
include/asm-mips/mach-generic/dma-coherence.h 2007-07-22 12:55:29.000000000 -0400 renamed from include/asm-mips/mach-generic/dma-coherence.h 2007-07-08 19:32:17.000000000 -0400 +1 -1
diff -Naurp linux-2.6.22.1-20070712.old/include/asm-mips/mach-generic/dma-coherence.h linux-2.6.22.1-20070712.size/include/asm-mips/mach-generic/dma-coherence.h
@@ -18,7 +18,7 @@ static inline dma_addr_t plat_map_dma_me
 }
 
 static inline dma_addr_t plat_map_dma_mem_page(struct device *dev,
-	struct page *page)
+	struct page *page, size_t size)
 {
 	return page_to_phys(page);
 }
include/asm-mips/mach-ip27/dma-coherence.h 2007-07-22 12:55:52.000000000 -0400 renamed from include/asm-mips/mach-ip27/dma-coherence.h 2007-07-08 19:32:17.000000000 -0400 +2 -1
diff -Naurp linux-2.6.22.1-20070712.old/include/asm-mips/mach-ip27/dma-coherence.h linux-2.6.22.1-20070712.size/include/asm-mips/mach-ip27/dma-coherence.h
@@ -26,7 +26,8 @@ static inline dma_addr_t plat_map_dma_me
 	return pa;
 }
 
-static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page,
+					size_t size)
 {
 	dma_addr_t pa = dev_to_baddr(dev, page_to_phys(page));
 
include/asm-mips/mach-ip32/dma-coherence.h 2007-07-22 12:56:09.000000000 -0400 renamed from include/asm-mips/mach-ip32/dma-coherence.h 2007-07-08 19:32:17.000000000 -0400 +2 -1
diff -Naurp linux-2.6.22.1-20070712.old/include/asm-mips/mach-ip32/dma-coherence.h linux-2.6.22.1-20070712.size/include/asm-mips/mach-ip32/dma-coherence.h
@@ -37,7 +37,8 @@ static inline dma_addr_t plat_map_dma_me
 	return pa;
 }
 
-static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page,
+					size_t size)
 {
 	dma_addr_t pa;
 
include/asm-mips/mach-jazz/dma-coherence.h 2007-07-22 12:56:30.000000000 -0400 renamed from include/asm-mips/mach-jazz/dma-coherence.h 2007-07-08 19:32:17.000000000 -0400 +2 -1
diff -Naurp linux-2.6.22.1-20070712.old/include/asm-mips/mach-jazz/dma-coherence.h linux-2.6.22.1-20070712.size/include/asm-mips/mach-jazz/dma-coherence.h
@@ -17,7 +17,8 @@ static dma_addr_t plat_map_dma_mem(struc
 	return vdma_alloc(virt_to_phys(addr), size);
 }
 
-static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page,
+					size_t size)
 {
 	return vdma_alloc(page_to_phys(page), PAGE_SIZE);
 }