* [PATCH 2/6 V3] sparc: Add pci32_unmap_page.
@ 2011-01-18 14:10 Kristoffer Glembo
2011-01-18 19:37 ` Sam Ravnborg
2011-01-22 0:51 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Kristoffer Glembo @ 2011-01-18 14:10 UTC (permalink / raw)
To: sparclinux
Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
---
arch/sparc/kernel/ioport.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index cea49c0..1b9f07c 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -524,6 +524,13 @@ static dma_addr_t pci32_map_page(struct device *dev, struct page *page,
return page_to_phys(page) + offset;
}
+static void pci32_unmap_page(struct device *dev, dma_addr_t ba, size_t size,
+ enum dma_data_direction dir, struct dma_attrs *attrs)
+{
+ if (dir != PCI_DMA_TODEVICE)
+ mmu_inval_dma_area((unsigned long)phys_to_virt(ba), PAGE_ALIGN(size));
+}
+
/* Map a set of buffers described by scatterlist in streaming
* mode for DMA. This is the scather-gather version of the
* above pci_map_single interface. Here the scatter gather list
@@ -646,6 +653,7 @@ struct dma_map_ops pci32_dma_ops = {
.alloc_coherent = pci32_alloc_coherent,
.free_coherent = pci32_free_coherent,
.map_page = pci32_map_page,
+ .unmap_page = pci32_unmap_page,
.map_sg = pci32_map_sg,
.unmap_sg = pci32_unmap_sg,
.sync_single_for_cpu = pci32_sync_single_for_cpu,
--
1.6.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/6 V3] sparc: Add pci32_unmap_page.
2011-01-18 14:10 [PATCH 2/6 V3] sparc: Add pci32_unmap_page Kristoffer Glembo
@ 2011-01-18 19:37 ` Sam Ravnborg
2011-01-22 0:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2011-01-18 19:37 UTC (permalink / raw)
To: sparclinux
On Tue, Jan 18, 2011 at 03:10:25PM +0100, Kristoffer Glembo wrote:
> Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
I am still missing from the changelog this information:
pci32_unmap_page is part of the DMA API and needed by
the leon ethernet driver.
Anyway:
Acked-by: Sam Ravnborg <sam@ravnborg.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/6 V3] sparc: Add pci32_unmap_page.
2011-01-18 14:10 [PATCH 2/6 V3] sparc: Add pci32_unmap_page Kristoffer Glembo
2011-01-18 19:37 ` Sam Ravnborg
@ 2011-01-22 0:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2011-01-22 0:51 UTC (permalink / raw)
To: sparclinux
From: Sam Ravnborg <sam@ravnborg.org>
Date: Tue, 18 Jan 2011 20:37:29 +0100
> On Tue, Jan 18, 2011 at 03:10:25PM +0100, Kristoffer Glembo wrote:
>> Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
>
> I am still missing from the changelog this information:
>
> pci32_unmap_page is part of the DMA API and needed by
> the leon ethernet driver.
>
> Anyway:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-22 0:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 14:10 [PATCH 2/6 V3] sparc: Add pci32_unmap_page Kristoffer Glembo
2011-01-18 19:37 ` Sam Ravnborg
2011-01-22 0:51 ` David Miller
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.