[PATCH 17/28] x86: adjust dma_free_coherent for i386
From: Glauber Costa
Date: Tue Apr 08 2008 - 12:33:26 EST
We call unmap_single, if available.
Signed-off-by: Glauber Costa <gcosta@xxxxxxxxxx>
---
arch/x86/kernel/pci-dma_32.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c
index 78c7640..49166a4 100644
--- a/arch/x86/kernel/pci-dma_32.c
+++ b/arch/x86/kernel/pci-dma_32.c
@@ -84,6 +84,8 @@ void dma_free_coherent(struct device *dev, size_t size,
WARN_ON(irqs_disabled()); /* for portability */
if (dma_release_coherent(dev, order, vaddr))
return;
+ if (dma_ops->unmap_single)
+ dma_ops->unmap_single(dev, dma_handle, size, 0);
free_pages((unsigned long)vaddr, order);
}
EXPORT_SYMBOL(dma_free_coherent);
--
1.5.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/