Commit 1bc3de94 authored by James Bottomley's avatar James Bottomley

Update x86 DMA API implementation to take GFP_ flags

parent dcff5c66
......@@ -14,10 +14,11 @@
#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;
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment