Commit 2e33e361 authored by Glauber Costa's avatar Glauber Costa Committed by Ingo Molnar

x86: adjust dma_free_coherent for i386

We call unmap_single, if available.
Signed-off-by: default avatarGlauber Costa <gcosta@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent cac67877
...@@ -80,6 +80,8 @@ void dma_free_coherent(struct device *dev, size_t size, ...@@ -80,6 +80,8 @@ void dma_free_coherent(struct device *dev, size_t size,
WARN_ON(irqs_disabled()); /* for portability */ WARN_ON(irqs_disabled()); /* for portability */
if (dma_release_coherent(dev, order, vaddr)) if (dma_release_coherent(dev, order, vaddr))
return; return;
if (dma_ops->unmap_single)
dma_ops->unmap_single(dev, dma_handle, size, 0);
free_pages((unsigned long)vaddr, order); free_pages((unsigned long)vaddr, order);
} }
EXPORT_SYMBOL(dma_free_coherent); EXPORT_SYMBOL(dma_free_coherent);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment