Skip to contentSkip to conversation

MIPS: Add missing calls to plat_unmap_dma_mem.

PATCH In review David Daney 2 participants 2 messages Dec 11, 2008 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Add missing calls to plat_unmap_dma_mem.

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

---
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(-)
arch/mips/mm/dma-default.c +0 -0
index 5b98d0e..e6708b3 100644
@@ -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);
#1 lore raw
Quoted 7 lines · David Daney

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

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