From: Kumba <kumba@gentoo.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Linux MIPS List <linux-mips@linux-mips.org>
Subject: [PATCH]: Allow plat_map_dma_mem_page to take a 'size' argument
Date: Sun, 22 Jul 2007 21:58:28 -0400 [thread overview]
Message-ID: <46A40B44.6020406@gentoo.org> (raw)
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@gentoo.org>
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);
}
reply other threads:[~2007-07-23 1:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46A40B44.6020406@gentoo.org \
--to=kumba@gentoo.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.