summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dma.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt2009-05-27 05:50:33 +0200
committerBenjamin Herrenschmidt2009-05-27 08:33:59 +0200
commit8b31e49d1d75729c1da9009664ba52abd1adc628 (patch)
tree046095a0cce051a471c7af93784c024c29a4f99b /arch/powerpc/kernel/dma.c
parentpowerpc: Minor cleanups of kernel virt address space definitions (diff)
downloadkernel-qcow2-linux-8b31e49d1d75729c1da9009664ba52abd1adc628.tar.gz
kernel-qcow2-linux-8b31e49d1d75729c1da9009664ba52abd1adc628.tar.xz
kernel-qcow2-linux-8b31e49d1d75729c1da9009664ba52abd1adc628.zip
powerpc: Fix up dma_alloc_coherent() on platforms without cache coherency.
The implementation we just revived has issues, such as using a Kconfig-defined virtual address area in kernel space that nothing actually carves out (and thus will overlap whatever is there), or having some dependencies on being self contained in a single PTE page which adds unnecessary constraints on the kernel virtual address space. This fixes it by using more classic PTE accessors and automatically locating the area for consistent memory, carving an appropriate hole in the kernel virtual address space, leaving only the size of that area as a Kconfig option. It also brings some dma-mask related fixes from the ARM implementation which was almost identical initially but grew its own fixes. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/dma.c')
-rw-r--r--arch/powerpc/kernel/dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 53c7788cba78..6b02793dc75b 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -32,7 +32,7 @@ void *dma_direct_alloc_coherent(struct device *dev, size_t size,
{
void *ret;
#ifdef CONFIG_NOT_COHERENT_CACHE
- ret = __dma_alloc_coherent(size, dma_handle, flag);
+ ret = __dma_alloc_coherent(dev, size, dma_handle, flag);
if (ret == NULL)
return NULL;
*dma_handle += get_dma_direct_offset(dev);