[PATCH]: Allow plat_map_dma_mem_page to take a 'size' argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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).

Signed-off-by: Joshua Kinard <kumba@xxxxxxxxxx>

 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(-)


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 --- linux-2.6.22.1-20070712.old/arch/mips/mm/dma-default.c 2007-07-08 19:32:17.000000000 -0400 +++ linux-2.6.22.1-20070712.size/arch/mips/mm/dma-default.c 2007-07-22 12:54:08.000000000 -0400
@@ -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);
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 --- linux-2.6.22.1-20070712.old/arch/mips/pci/pci-dac.c 2007-07-08 19:32:17.000000000 -0400 +++ linux-2.6.22.1-20070712.size/arch/mips/pci/pci-dac.c 2007-07-22 12:54:31.000000000 -0400
@@ -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);
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 --- linux-2.6.22.1-20070712.old/include/asm-mips/mach-generic/dma-coherence.h 2007-07-08 19:32:17.000000000 -0400 +++ linux-2.6.22.1-20070712.size/include/asm-mips/mach-generic/dma-coherence.h 2007-07-22 12:55:29.000000000 -0400
@@ -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);
 }
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 --- linux-2.6.22.1-20070712.old/include/asm-mips/mach-ip27/dma-coherence.h 2007-07-08 19:32:17.000000000 -0400 +++ linux-2.6.22.1-20070712.size/include/asm-mips/mach-ip27/dma-coherence.h 2007-07-22 12:55:52.000000000 -0400
@@ -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));

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 --- linux-2.6.22.1-20070712.old/include/asm-mips/mach-ip32/dma-coherence.h 2007-07-08 19:32:17.000000000 -0400 +++ linux-2.6.22.1-20070712.size/include/asm-mips/mach-ip32/dma-coherence.h 2007-07-22 12:56:09.000000000 -0400
@@ -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;

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 --- linux-2.6.22.1-20070712.old/include/asm-mips/mach-jazz/dma-coherence.h 2007-07-08 19:32:17.000000000 -0400 +++ linux-2.6.22.1-20070712.size/include/asm-mips/mach-jazz/dma-coherence.h 2007-07-22 12:56:30.000000000 -0400
@@ -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);
 }



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux