]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix up dma_alloc_coherent with 64bit DMA masks on i386.
authorDave Jones <davej@codemonkey.org.uk>
Wed, 8 Jan 2003 10:54:58 +0000 (02:54 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 8 Jan 2003 10:54:58 +0000 (02:54 -0800)
Cset 1.808 in 2.4 never got propagated forward to 2.5

It's pretty much the same fix as below (s/!=/</), but with the following
changes
 - This was a patch to pci_alloc_consistant(), which now wants to be
   dma_alloc_coherent()
 - Removal of the u32 cast

arch/i386/kernel/pci-dma.c

index 85b374f6bde01015593f1a6860a425bdd04e8253..af365ef1cae2d022f4d431100d8898e5d8cfa4b2 100644 (file)
@@ -19,7 +19,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
        void *ret;
        int gfp = GFP_ATOMIC;
 
-       if (dev == NULL || ((u32)*dev->dma_mask != 0xffffffff))
+       if (dev == NULL || (*dev->dma_mask < 0xffffffff))
                gfp |= GFP_DMA;
        ret = (void *)__get_free_pages(gfp, get_order(size));