powerpc/warp: Fix ISA_DMA_THRESHOLD default
authorSean MacLennan <smaclennan@pikatech.com>
Wed, 10 Jun 2009 15:09:23 +0000 (15:09 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 16 Jun 2009 04:15:44 +0000 (14:15 +1000)
If no device is passed to __dma_alloc_coherent, it defaults to using ISA_DMA_THRESHOLD
for the mask. This patch provides a reasonable default rather than 0.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/44x/warp.c

index c5118802a281a776b7a3e23f9dddcbf8e36ea75a..42e09a9f77e264ecd0a87cd580a2254f1216de4c 100644 (file)
@@ -43,7 +43,13 @@ static int __init warp_probe(void)
 {
        unsigned long root = of_get_flat_dt_root();
 
-       return of_flat_dt_is_compatible(root, "pika,warp");
+       if (!of_flat_dt_is_compatible(root, "pika,warp"))
+               return 0;
+
+       /* For __dma_alloc_coherent */
+       ISA_DMA_THRESHOLD = ~0L;
+
+       return 1;
 }
 
 define_machine(warp) {