summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-04-08 18:20:59 +0200
committerIngo Molnar <mingo@elte.hu>2008-04-19 19:19:58 +0200
commit2e33e361188617628e47b4bc47e87e84feaf556f (patch)
tree9a66f99445537ef47fb1a80b9bdac52483482704
parentx86: move bad_dma_address (diff)
downloadlinux-2e33e361188617628e47b4bc47e87e84feaf556f.tar.xz
linux-2e33e361188617628e47b4bc47e87e84feaf556f.zip
x86: adjust dma_free_coherent for i386
We call unmap_single, if available. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/pci-dma_32.c2
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 9199bccb9214..5ae3470113c6 100644
--- a/arch/x86/kernel/pci-dma_32.c
+++ b/arch/x86/kernel/pci-dma_32.c
@@ -80,6 +80,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);