All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] MIPS: Add missing calls to plat_unmap_dma_mem.
@ 2008-12-11  2:14 David Daney
  2008-12-11 11:17 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: David Daney @ 2008-12-11  2:14 UTC (permalink / raw)
  To: linux-mips

It appears that dma_free_noncoherent() and dma_free_coherent() are
missing calls to plat_unmap_dma_mem().  This patch adds them.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
This is split out from my OCTEON processor support patch at Ralf's
request.

 arch/mips/mm/dma-default.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 5b98d0e..e6708b3 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -111,6 +111,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
 void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
 	dma_addr_t dma_handle)
 {
+	plat_unmap_dma_mem(dma_handle);
 	free_pages((unsigned long) vaddr, get_order(size));
 }
 
@@ -121,6 +122,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
 {
 	unsigned long addr = (unsigned long) vaddr;
 
+	plat_unmap_dma_mem(dma_handle);
+
 	if (!plat_device_is_coherent(dev))
 		addr = CAC_ADDR(addr);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] MIPS: Add missing calls to plat_unmap_dma_mem.
  2008-12-11  2:14 [Patch] MIPS: Add missing calls to plat_unmap_dma_mem David Daney
@ 2008-12-11 11:17 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2008-12-11 11:17 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

On Wed, Dec 10, 2008 at 06:14:45PM -0800, David Daney wrote:

> It appears that dma_free_noncoherent() and dma_free_coherent() are
> missing calls to plat_unmap_dma_mem().  This patch adds them.
>
> Signed-off-by: David Daney <ddaney@caviumnetworks.com>
> ---
> This is split out from my OCTEON processor support patch at Ralf's
> request.

Because it's relevant to other processors supported in 2.6.28.

Patch applied.  Thanks!

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-11 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-11  2:14 [Patch] MIPS: Add missing calls to plat_unmap_dma_mem David Daney
2008-12-11 11:17 ` Ralf Baechle

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.