]> git.hungrycats.org Git - linux/commitdiff
Update x86 DMA API implementation to take GFP_ flags
authorJames Bottomley <jejb@raven.il.steeleye.com>
Mon, 13 Jan 2003 04:29:03 +0000 (22:29 -0600)
committerJames Bottomley <jejb@raven.il.steeleye.com>
Mon, 13 Jan 2003 04:29:03 +0000 (22:29 -0600)
arch/i386/kernel/pci-dma.c
include/asm-i386/dma-mapping.h

index af365ef1cae2d022f4d431100d8898e5d8cfa4b2..0c02ccee9349b10175540a87d3c7b1caae2d314e 100644 (file)
 #include <asm/io.h>
 
 void *dma_alloc_coherent(struct device *dev, size_t size,
-                          dma_addr_t *dma_handle)
+                          dma_addr_t *dma_handle, int gfp)
 {
        void *ret;
-       int gfp = GFP_ATOMIC;
+       /* ignore region specifiers */
+       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
 
        if (dev == NULL || (*dev->dma_mask < 0xffffffff))
                gfp |= GFP_DMA;
index 8599f2ced8ff3049c88ee4b014619926dd991fe4..19519e0fb9bf9227076e15cd167d335ab6f35391 100644 (file)
@@ -3,11 +3,11 @@
 
 #include <asm/cache.h>
 
-#define dma_alloc_noncoherent(d, s, h) dma_alloc_coherent(d, s, h)
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
 
 void *dma_alloc_coherent(struct device *dev, size_t size,
-                          dma_addr_t *dma_handle);
+                          dma_addr_t *dma_handle, int flag);
 
 void dma_free_coherent(struct device *dev, size_t size,
                         void *vaddr, dma_addr_t dma_handle);