# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.955 -> 1.956 # arch/i386/kernel/pci-dma.c 1.10 -> 1.11 # include/asm-i386/dma-mapping.h 1.1 -> 1.2 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/01/13 jejb@raven.il.steeleye.com 1.956 # Update x86 DMA API implementation to take GFP_ flags # -------------------------------------------- # diff -Nru a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c --- a/arch/i386/kernel/pci-dma.c Mon Jan 13 11:07:01 2003 +++ b/arch/i386/kernel/pci-dma.c Mon Jan 13 11:07:01 2003 @@ -14,10 +14,11 @@ #include 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; diff -Nru a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h --- a/include/asm-i386/dma-mapping.h Mon Jan 13 11:07:01 2003 +++ b/include/asm-i386/dma-mapping.h Mon Jan 13 11:07:01 2003 @@ -3,11 +3,11 @@ #include -#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);